Adding archive description to archive pages
Adding category and tag descriptions to the category/tag (archive) pages is possible by using a child theme in WPtouch Pro. To do so:
- Create a WPtouch Pro child theme if you're not already running one. You can create one manually or via the Make Child Theme extension.
- Copy header-bottom.php from the parent WPtouch Pro theme (whichever one you have active) to the child theme's directory. This is easily done with the make child theme extension. If you are manually copying it, make sure it is in /wp-content/wptouch-data/themes/_THE_MOBILE_CHILD_THEME_/default
Copy the code below to the very end of the header-bottom.php file that is in the child theme.
the_archive_description( '
', '' );
?>
- Save the changes to header-bottom.php.
- Activate the child theme in the Themes area of the WPtouch Pro admin panel.
The category/tag description will appear in archive pages after the category/tag name.
If you are using the Multi-Ads extension to add a header ad to the mobile theme, the description will appear after the header ad. If you would like to display the category/tag description before the header add, do the following:
- Create a WPtouch Pro child theme if you're not already running one. You can create one manually or via the Make Child Theme extension.
- Create a functions.php file in /wp-content/wptouch-data/themes/_THE_MOBILE_CHILD_THEME_/default
Add the code below to the functions.php file
add_action( 'wptouch_body_top_second', 'my_wptouch_body_top_second' ); function my_wptouch_body_top_second() {
// Show this after header ad
the_archive_description( '
', '' );
}
and save the changes.
- Activate the child theme in the Themes area of the WPtouch Pro admin panel.