WordPress.org

Ready to get started?Download WordPress

Forums

Show links to all posts in a given category? (2 posts)

  1. Gentist
    Member
    Posted 7 years ago #

    Is there an easy way to pull out a (linked) list for every post made under a certain category, similar to wp_list_cats()? This so that I won't have to manually create a link list for each relevant category.

    If anyone wonders why I would want such a function, it's because I need it for a Journal, not sorted by dates, but rather by events, and I want users to be able to navigate it by events (each post represents one event). I figured I'd make this work by creating a category.php file which includes above mentioned link list at the top of the page when browsing a category.

  2. Gentist
    Member
    Posted 7 years ago #

    I figured it out by using the get_posts() and a foreach loop, using a modified example from the get_posts() page. However, I still have one problem left... Is there a way to get rid of the permalink from the categorynames when using wp_list_cats()?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.