- This topic is empty.
-
AuthorPosts
-
June 28, 2013 at 4:30 pm #45941
andymacleod
ParticipantI’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
June 29, 2013 at 7:22 am #140942andymacleod
ParticipantI 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)
June 29, 2013 at 3:11 pm #140954ephoenix
MemberI 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): http://www.gravitationalfx.com/how-to-set-a-page-as-the-parent-of-a-wordpress-custom-post-type/
June 29, 2013 at 3:21 pm #140955chrisburton
Participant@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.
http://wordpress.org/support/forum/how-to-and-troubleshooting
http://wordpress.stackexchange.com
It might be better if you elaborate on what exactly you’re trying to do, though.
June 29, 2013 at 5:11 pm #140965furrycoat
MemberHmm im not sure
June 30, 2013 at 2:43 am #141016ephoenix
Member@chrisburton I did exactly that, and found another way to achieve what I wanted to do.
@Joe_Temp 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.June 30, 2013 at 10:28 am #141029andymacleod
ParticipantThanks 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!
Thanks,
Andy
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.