• RedPitbull

    (@redpitbull)


    <div id="author-info">
    
        <div id="author-image">
    
        	<a href="<?php the_author_meta('user_url'); ?>"><?php echo get_avatar( get_the_author_meta('user_email'), '80', '' ); ?></a>
    
        </div>   
    
      <div id="author-bio">
    
            <h4>About<?php the_author_link(); ?></h4>
    
            <p style="font-size:11px;"><?php the_author_meta('description'); ?></p>
        </div>
    
    </div><!--Author Info-->

    I have this code that is showing the author gravatar and description. I would like to don’t display those info in certain categories. Let’s say in category “FAQ” with id “44”. How can I do that?

Viewing 1 replies (of 1 total)
  • <?php
    $faq_category_id = 44;
    $category = get_the_category();
    $current_category_id = $category[0]->cat_ID;
    
    if( $current_category_id != $faq_category_id) { ?>
    
    <div id="author-info">
    
        <div id="author-image">
    
        	<a>"><?php echo get_avatar( get_the_author_meta('user_email'), '80', '' ); ?></a>
    
        </div>   
    
      <div id="author-bio">
    
            <h4>About<?php the_author_link(); ?></h4>
    
            <p style="font-size:11px;"><?php the_author_meta('description'); ?></p>
        </div>
    
    </div><!--Author Info-->
    
    <?php } ?>
Viewing 1 replies (of 1 total)
  • The topic ‘How to don't display author bio in certain categories?’ is closed to new replies.