Support » Plugin: AMP for WP - Accelerated Mobile Pages » Error in tag and category links

  • Resolved miguelangelmf

    (@miguelangelmf)


    Hello, in the file templates/design-manager/design-1/elements/meta-taxonomy.php

    There is a bug in the links to tags and categories

    echo ('<span class="amp-cat-'.$cat->term_id.'"><a href="'.trailingslashit( trailingslashit( get_category_link( $cat->term_taxonomy_id ) ) . AMPFORWP_AMP_QUERY_VAR ) .'" > '. $cat->name .'</a></span>');

    change to

    echo ('<span class="amp-cat-'.$cat->term_id.'"><a href="'.trailingslashit( trailingslashit( get_category_link( $cat->term_id ) ) . AMPFORWP_AMP_QUERY_VAR ) .'" > '. $cat->name .'</a></span>');

    $cat->term_taxonomy_id to $cat->term_id

    Same with

    echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.trailingslashit( trailingslashit( get_tag_link( $tag->term_taxonomy_id ) ) .'amp' ).'" >'.$tag->name .'</a></span>');
    echo ('<span class="amp-tag-'.$tag->term_id.'"><a href="'.trailingslashit( trailingslashit( get_tag_link( $tag->term_id ) ) .'amp' ).'" >'.$tag->name .'</a></span>');

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error in tag and category links’ is closed to new replies.