Learn how to fix the full width design in a Custom Post Type (CPT) of any Genesis Framework child theme by code with this tutorial.
Genesis offers 6 different template models that combine content with primary and secondary sidebars. But in most cases you probably won’t need to use all of them.
You saw how to apply the full width to all pages on the site but you might be more interested in restricting it to a certain CPT.
Find out how to do it:
Snippet to force Full Width Design on a CPT
Add this fragment to the end of the functions.php file:
Thanks to this snippet the CPT “course” will always have a full width design. Of course, you can modify it to affect the CPT you prefer.
But if you are going to create a specific template to display the courses (single-courses.php) you would have to enter this line of code instead of the previous one:
Do you want to force the full width structure of a CPT in Genesis? Now you have the code snippet you need.
If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.
Benefits of being a subscriber. 🙂