Forums

Confusion about listing all entries of a category on a post page (3 posts)

  1. crunchytoast
    Member
    Posted 3 years ago #

    Hello.

    I'm currently migrating my Movable Type blog onto WP 2.5.1 and everything is going smoothly except for one issue that I'm unable to find a solution for. I'm guessing the answer is so simple that I'm missing it completely. (I'm confused if it is a get_posts or a wp_get_archives issue, so any help is very much appreciated, especially if I overlooked a previous entry on this.)

    One an individual blog page, I'm trying to show the individual blog entry (no problem there) but also all the other entries in that category, by title, such as:

    "You are in the single_cat_title section. Here are all the other entries in that category:
    name of entry
    name of entry
    name of entry"

    Thanks in advance.

  2. VelvetBlues.com
    Member
    Posted 3 years ago #

    Yes, you can use single_cat_title()

    You could also use the_category().
    http://codex.wordpress.org/Template_Tags/the_category

    For the rest, I'd use get_posts()

    To customize its use, see:
    http://codex.wordpress.org/Template_Tags/get_posts
    There are a couple of relevant examples.

  3. crunchytoast
    Member
    Posted 3 years ago #

    Thanks for the reply! I'm happy this is able to be done without any plug-ins.

    Let me ask: is the query generated by the "wp-includes/category.php" or "wp-includes/category-template.php" page? I take it I don't have to write a custom query...it's all built in, I just have to put my smart hat on to try to write the correct get_posts tag?

Topic Closed

This topic has been closed to new replies.

About this Topic