• Resolved bethdean

    (@bethdean)


    Hi,
    I’m not that familiar with PHP, but basically what I want to do is hide my post title and date/metadata if it’s in my asides category (category number is 9). Here’s the code from my template:

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <p id="date"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></p>
    
    <div class="entry">
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    </div>
    <p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','',' <strong>|</strong>'); ?> <span class="metadatacomments"><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></span></p>
    </div>

    I know there’s an in_category tag, I didn’t know if there was something like is not category. Any help would be most appreciated!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to hide post title and date based on category.’ is closed to new replies.