WordPress.org

Forums

[resolved] How can I remove this link? (3 posts)

  1. sha12sha
    Member
    Posted 3 years ago #

    Hi,

    I have found a code to show post from child categories that works perfect,

    but I don't need the link to the category. How can I remove it? Thanks

    echo '<a href="' . get_category_link( $term->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $term->name ) . '" ' . '>' . $term->name. '</a> ';

  2. ahmedNaguib
    Member
    Posted 3 years ago #

    the code u put displays a link to the category , so remove it if you don't want the link to show and if you just want the name of the category then replace it with :
    echo $term->name;

  3. sha12sha
    Member
    Posted 3 years ago #

    Thank you so much! Just perfect :-)

Topic Closed

This topic has been closed to new replies.

About this Topic