WordPress.org

Ready to get started?Download WordPress

Forums

one post for each parent category? (3 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    is there any way to specify which categories (they would be my parent categories) i want to show up on the index page, and only have one post for each?
    ps-i posted this in the hacks section by accident

  2. carthik
    Member
    Posted 10 years ago #

    paularms, this can be done with a little modification to index.php
    There is a lot of information as to how to exclude a category/categories from being displayed on index.php You could search the forums so you can see all flavors.
    As to displaying one post per category, you will have to write some code to restrict the posts displayed from a category to just one.
    Have at it, and post with any specific problems, or join #wordpress on irc.freenode.net for expert advice.
    :)

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    that really doesn't help at all. not only did the "show only one category" mod not work for me, but i didn't come up with anything in a search.
    is there a way that i could hardcode into the php each category that i want to get... so basically i would have a <div class="post"> for each parent category. also, i want to be able to check the parent category and return ONLY the parent category in just plain text for use of getting proper images etc... i really *hate* the way that <?php the_category()?> etc return values.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.