Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • thank you for this useful code share!

    Thread Starter athrill

    (@athrill)

    my apologies…

    after searching, i found the answer to my question within this forum.

    if you do not want the time and date to appear, simply remove or comment out the “<span class=”post-info”><?php the_time(‘F jS, Y’); ?></span>” string.

    <?php $how_many=3; //How many posts do you want to show
    require_once('wp-config.php'); // Change this for your path to wp-config.php file&nbsp;?>
    
    <strong>Latest Blog postings</strong>
    <ul class="latest-news">
    <?php
     global $post;
     $myposts = get_posts('numberposts=3');
     foreach($myposts as $post) :
     ?>
        <li><span class="post-info"><?php the_time('F jS, Y'); ?></span><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
     <?php endforeach; ?>
    </ul>
Viewing 2 replies - 1 through 2 (of 2 total)