WordPress.org

Ready to get started?Download WordPress

Forums

insert date and time in Horizontal marquee recent posts (1 post)

  1. aleksej93
    Member
    Posted 2 years ago #

    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>

Topic Closed

This topic has been closed to new replies.

About this Topic