wp_get_archives how to include description of posts? (4 posts)

  1. databell96
    Posted 6 years ago #

    I'm using wp_get_archives for the first time and it displays a list of my posts but that's it. I want it to include the description as well just like on my blog but on a regular webpage so I can include permalinks. Any idea on how to accomplish this?

  2. stvwlf
    Posted 6 years ago #

    wp_get_archives may not be the best choice of function for what you are looking for.

    not clear from your description exactly what you mean. When you say display "on a regular webpage", are you referring to a WordPress static page, or an HTML page that is not at all part of WordPress?

    You may be better off using a custom query, which would include the description and permalink and title - your own custom WordPress loop. For details look at this article

    Feel free to ask further questions.

  3. databell96
    Posted 6 years ago #

    What I mean is usually when you go to a listing of blogs, you get the title of the post and then either the entire post or a condensed version underneath it. That's what I want. I want to display the title of the post (which it does now) and then a truncated version of the post itself. Like you normally see in a blog only on a page.

  4. MichaelH
    Posted 6 years ago #

    The template tag, wp_get_archives(), does not have the ability to display anything but the post title.

    Another example of what stvwlf was suggesting may help you--see the Page of Posts example in the Pages article.

Topic Closed

This topic has been closed to new replies.

About this Topic