[Resolved] Removing links from all taxonomy items

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Removing links from all taxonomy items

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Tom 2 weeks, 3 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12502

    drew
    Participant

    Hi tom, I’ve been going through some of the past support board queires on this topic and so far, can only get the snippet that removes the date link to work.

    add_filter( 'wpsp_date_output', 'tu_wpsp_remove_date_link' );
    function tu_wpsp_remove_date_link() {
        $time_string = '<time class="wp-show-posts-entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>';
    
        if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
            $time_string .= '<time class="wp-show-posts-updated" datetime="%3$s" itemprop="dateModified">%4$s</time>';
        }
    
        $time_string = sprintf( $time_string,
            esc_attr( get_the_date( 'c' ) ),
            esc_html( get_the_date() ),
            esc_attr( get_the_modified_date( 'c' ) ),
            esc_html( get_the_modified_date() )
        );
    
        printf(
            '<span class="wp-show-posts-posted-on wp-show-posts-meta">%1$s</span>',
            $time_string
        );
    }

    But I am running into a wall on removing the category link. Suggestions?

    Here’s the active work site: http://akustiksstage.wpengine.com/news/

    #12520

    Tom
    Keymaster

    Hi there,

    It doesn’t look like WP has a filter to do this.

    I wonder if this would work?:

    add_filter( 'wpsp_terms_output', function( $output ) {
        return strip_tags( $output );
    } );
    #12526

    drew
    Participant

    Bingo! That did the trick. This is so going into my gitHub snippet list 🙂

    Thanks so much 🙂

    #12544

    Tom
    Keymaster

    You’re welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.