remove date/time stamp for some posts but not others (2 posts)

  1. jonnyd
    Posted 6 years ago #

    Hi all,

    How do i remove date/time stamp for some posts but not others?

    Thanks in advance,


  2. la_ri_za
    Posted 6 years ago #

    in similar situation (removing comments from one specific category), I have done like this in the post loop:

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="topPost">
    <p class="topAuthor"><?php the_author_posts_link(); ?></p>
      <h2 class="topTitle"><?php the_title(); ?></h2>
      <p class="topMeta"><?php the_time('j F Y') ?> | <?php the_category(', '); ?> </p>
      <div class="topContent"><?php the_content(' More...'); ?></div>
        <p><?php the_tags('Tags: ', ', ', ''); ?></p>
     </div><!-- Closes topPost -->
     if ( in_category(10) ) {
     } else {
     include(TEMPLATEPATH . '/showcomments.php');
    <?php endwhile; ?>
    <?php else : ?>

    You could do something like this. Meaning that you save file (in your theme folder) called showdate.php or something where you put the date tag. And then you could put the if-else-condition above in the place where you have date tag now. My php skills are actually lousy but this is something which I found somewhere and works for me (possibly someone else has more elegant solution! :))

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.