• Resolved wizbian01

    (@wizbian01)


    Hi guys,

    I’m in the process of changing the format of my post archive in the sidebar and am having trouble coming up with the tags/php.

    Following is all i have so far which gets me the titles of the last 3 posts as li’s.

    <?php wp_get_archives('type=postbypost&limit=3&format=html'); ?>

    I’m wanting the format of:

      Post title
      Date/time
      Summary

    Any assistance would be greatly appreciated. Thanks. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • I would perhaps move away from using wp_get_archives(), and use a separate loop that gives you more control over how it’s displayed.

    <?php query_posts("showposts=3"); ?>
    <?php while (have_posts()) : the_post(); ?>
    	<a href="<?php the_permalink() ?>">
    		<?php the_title(); ?>
    	</a>
    	<?php the_time('M j, Y'); ?>
    	<?php the_excerpt();?>
    <?php endwhile; ?>

    Thread Starter wizbian01

    (@wizbian01)

    Thanks muchly, Keighl! Worked a charm! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customising format of archive within sidebar.’ is closed to new replies.