• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Page Template To Show All Posts From Categories With Category Description

This tutorial shows the featured image and post title from the most recent posts in every category on one page like this:

category-description

Note: You want to make sure your featured images are all the same size otherwise regenerate thumbnails, or remove the entry class from the code which prints the white background.

You can also exclude, include and customise what posts and categories you want displayed simply by changing the settings in the code.

Code Installation

  1. Using a code editor, create a new file in your child themes root directory named custom.php and add the code to the file.
  2. Select the Template from the drop down menu under the Page Attributes met a box on your Edit Page screen.

Here’s the code:

Register for full access

Related Tutorials

  • Template To Display All Posts by Each Category In Genesis
  • Template For All Custom Taxonomy Type Titles & Entries
  • Display Featured Images From Posts In Each Category On 1 Page

Reader Interactions

Comments

  1. Tony Brennan says

    October 27, 2015 at 3:37 am

    Hi Brad,
    How would I get this template to work for 1 category only? I have 4 categories, so ideally I’d like to have 4 templates.

    Thanks
    Tony

    Log in to Reply
    • Brad Dalton says

      October 27, 2015 at 3:56 am

      You could set the category paremeter like this:

      'cat' => value,

      Swap out the $value for the category slug or category id.

      Or you could simply use column classes to display your category archives in columns.

      You can also use the template hierarchy and create category files for each using the slug like category-news.php where news is the name of the category.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.