[resolved] How do I make archives display titles/excerpts only? (4 posts)

  1. VolleyBum
    Posted 10 years ago #

    Right now, the code that controls the archive pulldown menu in my footer looks like this:

    <select NAME="site" onChange="jumpTo(this);">
    <option selected value>Archives
    <?php wp_get_archives('type=monthly&format=option'); ?>

    So, for example, if I click on "April 2006" it displays every post from April in full form (title + content). I'd like, instead, to display only the titles and excerpts (without the actual content) of my posts on the archive pages. So instead of scrolling endlessly through posts, it will be easier for the reader to browse the titles & excerpts and then select which individual posts they'd like to read by clicking them. Can anybody point me in the right direction or show me how to modify the code to achieve this effect? Hope this makes sense.

  2. moshu
    Posted 10 years ago #

    It has nothing to do with the menu/pulldown.
    It has to do with the Template_Hierarchy. If your theme is lacking an archive.php template file then it uses the index to display the posts in the archives view.
    Create an archive.php file - e.g. saving your index.php as archive.php and replace the_content tag with the_excerpt tag.
    More: Template_Tags.

  3. VolleyBum
    Posted 10 years ago #

    P.S. I'm not using the default theme. I'm using something that has no archives.php file. (Or at least not one that gets displayed in the theme editor).

  4. VolleyBum
    Posted 10 years ago #

    I shall try it. I was wondering if it had something to do with the absence of that file... Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic