Wordpress: Linking custom post types with templates?

by 0 replies
Hi all,

I'm hoping somebody can help me with this...

I created a custom post type ('lessons'). I don't want it to use the default post template, so I created an alternative ('unit.php') that I can use with my page builder. However, I am having an issue.

Although I set the template to 'unit' and everything displays fine, it seems to randomly revert back to the default on some lessons. I have no idea why. Even without this issue, it's a slight pain to select a different template each type I create a lesson.

I was wondering if there is a simple way to create a rule in Wordpress that means if I create a 'lesson' CPT, then it would automatically use a 'unit' template (unless otherwise specified)?

Any pointers would be welcome!
#website design #custom #linking #post #templates #types #wordpress
Avatar of Unregistered

Trending Topics