Wordpress: Linking custom post types with templates?

by ElGuapo 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

  • 11 {{ upvoteCount | shortNum }}

    Is this a good idea?

    melpa64 in Internet Marketing

    Hey Guys, I just wanted some advice from those of you run or have run a web design/development business. I have have just finished my site for my new web ... [read more]

  • 15 {{ upvoteCount | shortNum }}

    Hello, I'm Very Experienced at Partial Success

    Hey everyone! I am not new to the Warrior Forum, but I have not posted before so I wanted to introduce myself before I start getting involved here. What Am ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    How do I track specific buttons on a ticketing system widget using Google Tag Manager?

    amobbs in Internet Marketing

    I have a task to do where I need to track a ticketing system. It is a widget that is on the website and I want to track a "Next" ... [read more]

  • 62 {{ upvoteCount | shortNum }}

    How do I get more clicks or traffic on a particular keyword?

    Nikhil Bansal in SEO

    I have some keywords that have a great ranking on Google, but they don't have clicks and traffic, so I want to know how can I get more traffic and ... [read more]

  • 1 {{ upvoteCount | shortNum }}

    Facebook and Instagram Verification Badge

    Raymark Abrique in Social Networks

    Is it possible to buy a verification badge on Facebook and Instagram? If it is possible, where can I buy?