• Hi,
    I have used ‘get_archives’ to list the titles of my posts in the sidebar as navigation, but have noted that this tag has now been deprecated, and should be replaced with wp_get_archives.
    However, wp_get_archives just displays the month and not the post titles;
    How can I get wp_get_archives to show the titles of the posts again?
    Thank you for any help

Viewing 6 replies - 1 through 6 (of 6 total)
  • The template tag, wp_get_archives(), also has a type=postbypost argument designed specifically for you ??

    Thread Starter smoo

    (@smoo)

    Awww.. Thanks WordPress :o)

    However I *am* using postbypost..

    This is the code I’m using (in a site I made last year):

    <ul>
    <?php get_archives('postbypost','10','custom','<li>','</li>'); ?>
    </ul>

    Which returns a list of the latest 10 post titles.

    But adding a wp_ to the beginning of ‘get_archives’ in this line returns exactly the same thing as

    <?php wp_get_archives('type=monthly'); ?>

    (which is what I have underneath the first code in my sidebar).

    The result is 2 lists of monthly archives, and no titles..
    Am I just using it wrong?
    Thanks again for any help..

    Did you try type=postbypost with wp_get_archives?

    Thread Starter smoo

    (@smoo)

    Hi again,
    and yes;
    I just added wp_ to the beginning of what I already have, so it looks like this:
    <?php wp_get_archives('postbypost','10','custom','<li>','</li>'); ?>

    And the result looks like this:

    News & What’s On
    * May 2009
    * April 2009

    Archives
    * May 2009
    * April 2009

    -where ‘News & What’s On’ used to list the latest ten post titles..

    Thanks so much for trying to help!

    Please review the wp_get_archives link I provided–you need to structure your arguments correctly.

    Thread Starter smoo

    (@smoo)

    Thank you for your time, I will give it a go.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘how to show post titles, not months, using wp_get_archives’ is closed to new replies.