The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Custom Post Types in WordPress

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #45941

    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


    I should also mention that I am using the Advanced Custom Fields and Custom Post Type UI plugins (as used by Chris in his mobile site development screencasts in The Lodge)


    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 ;-) ).

    If that doesn’t help you, here’s the PHP-way (which I couldn’t get to work, but maybe you have more luck/skill):


    @ephoenix @andymacleod If no one can answer your questions here, you could always use the WordPress forum or the dedicated WordPress section on Stack Overflow.

    It might be better if you elaborate on what exactly you’re trying to do, though.


    Hmm im not sure


    @chrisburton I did exactly that, and found another way to achieve what I wanted to do.

    From my understanding of wordpress’ cpt-system, a custom post type can be a page too, you just have to set **’capability_type’ => ‘page’** for that. Correct me if I’m wrong.


    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). Got it working now! 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!



Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Other’ is closed to new topics and replies.