• Resolved mindfeck

    (@mindfeck)


    On my site, my posts with the category “writing” are displayed, but the whole post is displayed. Is there a way to only put the excerpt, or only the title?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter mindfeck

    (@mindfeck)

    that has nothing to do with what I want.

    It has everything to do with what you want. You are interested in the <!--more--> tag. This is what breaks the post so that only an excerpt is shown on the home page.

    Thread Starter mindfeck

    (@mindfeck)

    No, that does not work. I just want the title or the excerpt to show on this category archive page. That doesn’t work. I’ve tried it.

    Replacing the_content with the_excerpt works too.

    If you only want to do this for one category, you might have a look at Category_Templates as well.

    Thread Starter mindfeck

    (@mindfeck)

    That was my problem. I changed the_content to the_excerpt in my index page, and that changed it everywhere, but I wanted it as the_content on the front page. Is there an easy way to just list the titles of each post in a certain category?

    Ok, I think I follow now. Your theme apparently uses index.php for many scenarios? this would be good to glance over then: Template_Hierarchy

    Here’s what I’d try:
    Change your theme’s index.php back to using the_content.
    Create an archive.php page as a copy of index.php, and change the_content to the_excerpt.

    Thread Starter mindfeck

    (@mindfeck)

    Thanks! That was exactly what I needed. If I just want the titles of the posts, what would I put?

    Well, in that case you probably want to just completely remove the_content or the_excerpt (along with, presumably, whatever <div> tags wrap ’em in your theme)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Category archive’ is closed to new replies.