Support » Fixing WordPress » Archives Widget Modifications

  • I want to list my archives by date but have it display the post title instead of the date. I’ve searched all through the theme files and I can’t figure out how to edit the Archives widget.

    I looked up the wp_get_archives() function, but I don’t see an option to display by post-title.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    No problem… You’re right if you read this CODEX function reference :

    I understand that you want to list posts post-by-post.

    Do that :

    <div class="entry">
    <h3>Posts :</h3>
    <div style="margin-left: 30px;">
    <ul style="font-size: 15px;">
    <?php wp_get_archives('type=postbypost'); ?>

    This will displays your posts (ordered by post date) using the post title.


    Thread Starter nickandrea19


    Sweet, thank you. Yes, I initially tried that but it took some more figuring because I was using a child theme with additionally registered sidebars, and I was missing this whole snippet: <?php wp_get_archives( array( 'type' => 'postbypost' ) ); ?> from my sidebar.php file. So, I has to write it in.

    Thank you for the confirmation. It worked!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Archives Widget Modifications’ is closed to new replies.