I’m a teacher and amateur web designer. On a school site I’ve been making in WordPress, I’ve created a Custom Post Type called Lessons. How do I get the Lesson pages to be child pages of regular pages?
I want my colleagues to be able to create Lessons and attach them to the right course units, but I want to restrict them from editing regular pages…
Your help would be appreciated! You can see what I’ve done so far at science.standhigh.info
I asked a similar question a couple of months ago, but it turned out, that nobody could help me with it. Since then I researched on my own. I found out, that, if you are good with PHP (which I’m not), you probably can pull this off. In my case I just couldn’t get it to work, so I gave up and took another approach.
I don’t know if this will help you, but you can create an archive for your custom post type. Just create a new template file and name it **archive-“your-custom-post-type”.php** (without the quotation marks). Oh, and make sure to check *has archive* in Custom Post Type UI. You could sort the lessons with custom taxonomies there.
Or you could create a custom taxonomy for each topic and have your colleagues tag their posts with the right taxonomies. You could then link to a custom taxonomy archive for each lesson/topic (yes, this will probably be a mountain of work ;-) ).
Thanks for the replies and ideas. I think the main problem is my lack of understanding about taxonomies…
I got my single-lessons.php template working yesterday (apart from a repeater-field for file attachments – which I’m reasonably confident I’ll get sorted soon). So the custom taxonomy issue is the main thing I need help with…
I need my non-technical colleagues to be able to assign a lesson to a particular unit with a single click or select field. There will be about 100 different units of work in a hierarchy of up to 5 levels… So for example, a lesson could be assigned to:
Science > AS Level Physics > Unit 1 > Section 1
At the moment, I have no idea how to achieve this!