• Resolved drlorenzetti77

    (@drlorenzetti77)


    How to display category description only on the first page?

    I just need it to appear on the first page because otherwise it is duplicate content for the user

    This added to my theme

    <?php if ( $paged < 2 ) : ?>
    <div><?php echo category_description( $category_id ); ?></div>
    <?php endif; ?>

    I would like to know how to do for amp

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    In template/design-manager/design-x/archive.php replace this:

    if( $arch_desc ) {  ?>
    <div class="amp-wp-content taxonomy-description">
    <?php echo $arch_desc ; ?>
    </div>
    <?php } ?>

    to this:

    if( $arch_desc ) {  ?>
    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
    <?php if ( $paged == 1 ) : ?>
    <div class="amp-wp-content taxonomy-description">
    <?php echo $arch_desc ; ?>
    </div>
    <?php endif; ?>
    <?php } ?>

    hope this help.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi @drlorenzetti77,

    I have resolved this and added in our next update.

    reference: https://github.com/ahmedkaludi/accelerated-mobile-pages/issues/1029

    Regards
    Marqas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to display category description only on the first page’ is closed to new replies.