Display Featured Images From Posts In Each Category On 1 Page

This template enables you to display posts from all or any categories on one page like the following example:

posts-each-category

The template also enables you to add content to the editor which is displayed before the featured images for each category.

content-before-loop

The code includes 2 sets of $args.

  1. 1 set for get_categories
  2. 1 set for WP_Query

These $args enable you to use any parameters which effect each category as well as the large range of WP_Query parameters.

All you need to do is use a code editor to paste the code into a new file named something like custom.php and upload to your child themes root directory.

You can then select the page template named Post Images From Categories from the drop down menu in the Page Attributes box.

Here’s the code:

Related Tutorials


Comments

2 responses to “Display Featured Images From Posts In Each Category On 1 Page”

  1. […] Display Featured Images From Posts In Each Category On 1 Page […]

  2. […] Display Featured Images From Posts In Each Category On 1 Page […]

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.