WordPress.org

Ready to get started?Download WordPress

Forums

Archives Widget Modifications (3 posts)

  1. nickandrea19
    Member
    Posted 1 year ago #

    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.

    Thanks.

  2. riversatile
    Member
    Posted 1 year ago #

    Hi,

    No problem... You're right if you read this CODEX function reference : http://codex.wordpress.org/Function_Reference/wp_get_archives

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

    Do that :

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

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

    Regards

  3. nickandrea19
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic