Display posts from specific category, tag on page in Genesis

By default, WordPress generate pages for all tags and categories automatically. If you click specific category page (like site.com/category/guide), it will display all posts ‘date-wise’ from that category. You can easily transform (site.com/category/guide) to (site.com/guide) by removing “/category” from the url slug by using specific plugin. However, Genesis users can do this without plugin using small code with possibility of variety of combinations.

Posts from specific category / tag using “query_args”

1. In your WordPress Dashboard goto Pages > Add New (or open exisiting page). For example: if you want to make a Blog page showing posts from one specific category, add Blog as page title and look for “Custom Fields” section at the bottom of post editor. If it is not visible, click “Screen Options” at top right and then check the “Custom Fields” option.

2. In the “Custom Fields” section, type query_args in the name field and cat=10 in the value field. Then click on “Add Custom Field” button. Here 10 is the ID of specific category whose posts you want to display. This will display posts from category whose ID is 10 at specific blog page (like site.com/blog).

You can easily find ID of category and tags in WordPress. Also make sure you select “Blog” option from Template drop down box under “Page Attribute” section on right side of the dashboard for this to work.

3. For display posts from more than one category use value cat=10, 1 where 10 and 1 are IDs of categories from which you want to display posts. For displaying posts from all categories use cat=all in the value field.

4. For displaying posts from specific tag, you need to use tag=Google where Google is the tag name. For displaying posts from multiple tags use tag=Google, Desktop where Google and Desktop are two different tags.

5. Besides including posts from specific category and tags, you can also tweak it further for excluding posts from specific category or tag. For example: to exclude posts from specific category with ID 10, use cat=-10 in the value field. Credit Brian Gardner

SHARE

Comments

  1. Hi,

    Do you know how can I show multiple post formats in a page?
    By default, WP will generate archive page for each post format registered in the theme. But how if I want to create a page with multiple post format?

  2. Hey, thanks for posting this great tutorial! I have a question though… is there a way to have the category page show only summaries of each post? Right now when I set up the page it shows the full article, but I would like to see 10 or so “above the fold.” I want to use this for a press release section.

    Thanks!

    • Goto Genesis > Theme Settings. Then in Content archive settings, select display post excerpts. If you have selected ‘display post content’ option, then enter limit number like 100

Speak Your Mind

*

Subscribe to our mailing list

* indicates required
Close