• Resolved greenwide

    (@greenwide)


    Hello! Thank you for your plugin, it’s great.

    Can you help me with one thing? I need to hide views counter at all posts from one specific directory, how can I do that?

Viewing 1 replies (of 1 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I need to hide views counter at all posts from one specific directory, how can I do that?

    I assume you used something like echo do_shortcode( '[jp_post_view]' ); to add the view counter somewhere in your theme, on all posts?

    If so, you can wrap that code in a conditional tag to control where it should appear:
    https://developer.www.ads-software.com/themes/basics/conditional-tags/#a-category-page

    In practice, it would mean something like this:

    
    // Only display the counter if the category is not "blue-cheese".
    if ( ! is_category( 'blue-cheese' ) ) {
        echo do_shortcode( '[jp_post_view]' );
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘Hide counter for specific category’ is closed to new replies.