[Support request] Disable meta info link

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Disable meta info link

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28657
    Alexander
    Participant

    Hi! Could you please help me to disable meta info link for a custom post type “Portfolio” category and any other meta info

    
    <div class="wp-show-posts-entry-meta wp-show-posts-entry-meta-below-title post-meta-inline"><span class="wp-show-posts-terms wp-show-posts-meta"><a href="https://grimerka.by/portfolio_category/woman" rel="tag">Женская фотосессия</a></span></div>
    
    #28668
    elvin
    Moderator

    Hi there,

    It’s done within the WPSP edit page’s “Meta” tab.
    https://docs.wpshowposts.com/article/meta-overview/

    Uncheck the meta items you want to remove.

    #28670
    Alexander
    Participant

    Actually, I would like the meta info to be visible without links that create extra pages I don’t want to exist due to SEO reasons.

    #28672
    elvin
    Moderator
    #28682
    Alexander
    Participant

    Unfortunately, the code provided by Tom removes the category tag completely but not the link of the tag. Ok, if it’s not possible, never mind 🙂

    #28689
    elvin
    Moderator

    Try this instead.

    add_filter( 'wpsp_terms_output', function( $output, $settings ) {
        return sprintf( '<span class="wp-show-posts-terms wp-show-posts-meta">%1$s</span>',
            strip_tags( get_the_term_list( get_the_ID(), $settings[ 'taxonomy' ], '', apply_filters( 'wpsp_term_separator', ', ' ) ) )
        );
    } ,15 ,2);
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.