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:

  1. 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.
  2. 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
  3. Copy the code below to the very end of the header-bottom.php file that is in the child theme.

    <?php 
    the_archive_description( '<div>', '</div>' ); 
    ?>
  4. Save the changes to header-bottom.php.
  5. 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:

  1. 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.
  2. Create a functions.php file in /wp-content/wptouch-data/themes/_THE_MOBILE_CHILD_THEME_/default
  3. 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( '<div>', '</div>' );
    }

    and save the changes.
  4. Activate the child theme in the Themes area of the WPtouch Pro admin panel.
The category/tag description will appear in the archive pages after the header ad.

Still need help? Contact Us Contact Us