• Resolved tolddsm

    (@tolddsm)


    Hi,

    Great plugin!

    I used the code in this page Tags and Category showing: to show tags and it works!

    Is there a way to remove the tag links with static text?
    Don’t want people to click tags as I don’t have a well designed layout for tag category pages.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Elvin

    (@ejcabquina)

    Hi there,

    You can try using strip_tags().

    Example:

    add_action( 'wpsp_after_title', 'tu_add_tags_after_title' );
    function tu_add_tags_after_title() {
        echo strip_tags(get_the_term_list( get_the_ID(), 'post_tag', '', apply_filters( 'wpsp_term_separator', ', ' ) ) );
    }
    Thread Starter tolddsm

    (@tolddsm)

    Hi Elvin,

    Thanks, your code works!

    Can you improve it by adding a class name or div to the tag so I can modify it using some css with margins/colors etc?

    Thanks!

    Plugin Support Elvin

    (@ejcabquina)

    Try this:

    add_action( 'wpsp_after_title', 'tu_add_tags_after_title' );
    function tu_add_tags_after_title() {
        echo '<span class="tag-term">'.strip_tags(get_the_term_list( get_the_ID(), 'post_tag', '', apply_filters( 'wpsp_term_separator', ', ' ) ) ).'</span>';
    }

    You can use span.tag-term selector.

    Thread Starter tolddsm

    (@tolddsm)

    Works, thanks!

    Plugin Support Elvin

    (@ejcabquina)

    No problem. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show tags and remove link’ is closed to new replies.