• Does anyone know of a plugin that identifies post as new for a set period of time and will include a “new” image to show users its a fresh post?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter bremmerm

    (@bremmerm)

    Figured it out.

    <div id="content-left"> <img src="https://www.doucheon.com/images/re-defining.gif" alt="www.DoucheOn.com" />
    
    <?php if (have_posts()) :  /* <<<<<< Start of WordPress Loop */
    
      $i=0; /* <<<<<< Set Variable  */
    
      ?>
    		<?php while (have_posts()) : the_post();  /* <<<<<< Post Loop */
    if($i<=4) $txt="<div class=\"new-post\"></div>"; /* <<<<<< insert repeated html - also set amount of post it will repeat through by changing "4" */
    else$txt=" ";
    
    $i++;
    
      ?>
    
      <?php echo $txt; ?>/* <<<<<< Use this for HTML Out Put */

    Hi,

    Thanks for this trick.

    Please let me know in which file should I make this changes?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Identify New post?’ is closed to new replies.