WordPress.org

Support

Support » How-To and Troubleshooting » insert date and time in Horizontal marquee recent posts

insert date and time in Horizontal marquee recent posts

  • hi, i have this code for insert in my header a horizontal marquee with recend post, but one problem I have is to put before each title, time and date(numerical) of the publication of the post.
    es: 13.45 12/03/12, Title1 – 12.30 12/03/12, Title2……

    this is original code:

    <marquee behavior="scroll" direction="right">
    <h2>
    <?php
    $sep = ' - ';
    $separator = ' choice ';
    	$args = array( 'numberposts' => '5');
    	$recent_posts = wp_get_recent_posts( $args  );
    	foreach( $recent_posts as $post ){
    		echo $sep . '<a href="' . get_permalink($post["ID"]) . '" title="Look '.$post["post_title"].'" >'.   $post["post_title"].  '</a>';
    $sep = $separator;
    	}
    ?>
    </h2>
    </marquee>
  • The topic ‘insert date and time in Horizontal marquee recent posts’ is closed to new replies.
Skip to toolbar