Load Custom Single Post Template For Specific Category & Child Categories

The template and code in the download folder enable you to customize all single posts for 1 or more categories as well as all posts assigned to child/sub categories of the parent categories.

Here’s what the single template produces tested using the Altitude Pro child theme by StudioPress.

And here’s the demo video showing how the template loads on posts in specific parent & child categories :

Video Demo

Shows the template being load on posts assigned to 1 specific parent category and posts assigned to all child categories of the same parent category.

Installation

There’s 2 steps :

Step 1 : From the download folder, upload the file named single-resources-category.php to your child themes root directory.

Step 2 : From the download folder, copy & paste the code from the functions.php file to the end pf your child themes functions file.

You will need to edit the functions code with the i.d for your category as well as the category slug.

Register or login to access the code in the download folder;

Join 5000+ Followers

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