![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
||||
|
||||
|
I've created a custom post type called "Projects". I'm trying to get the categories and tags meta boxes to display in the content editor. So far no luck. Not sure what's wrong. Here's the code I've got:
PHP Code:
__________________
SpearsMarketing.com |
|
#2
|
|||
|
|||
|
Your code looks fine to me, but:
1. Have you hooked that function to 'init'? 2. Assuming yes, have you checked the Screen Options tab in the editor to make sure the metaboxes are visible?
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#3
|
||||
|
||||
|
I've check the screen options and it's not there, so it's probably the fact I haven't hooked it to 'init'. I'm not quite sure how to do that. The code above is all I've added for the CPT.
__________________
SpearsMarketing.com |
|
#4
|
|||
|
|||
|
You have to register CPT after the taxonomies have been created, hence you need to hook to init.
Do this: PHP Code:
__________________
Ade Themessence - Studiograsshopper WordPress plugins: Dynamic Content Gallery | Reveal Page Templates | Custom Taxonomies Menu Widget Check out the Genesis and Child Theme tutorials before posting your question - and please provide YOUR URL! Make Andrea happy - read her Firebug tutorial and save yourself loads of time and effort. |
|
#5
|
||||
|
||||
|
Thanks Ade, that's just what I needed. Works great. Apparently the tutorial I followed previously had left that part out.
__________________
SpearsMarketing.com |
|
#6
|
||||
|
||||
|
Got another question. In the CPT editor, blog categories and tags are displaying. I was hoping this would create a new taxonomy for the cpt, (so that I could create specific categories for the cpt), but it appears to just be using what's already there. Is there something else I need to do make it behave like that?
__________________
SpearsMarketing.com |
| Tags |
| categories, custom post types, tags |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Custom Taxonomies vs Categories on Custom Post Types - what makes sense for my site? | Travis Hill | General Discussion | 7 | 01-25-2012 10:30 PM |
| Using categories with custom post types | Bill Murray | General Discussion | 5 | 06-24-2011 07:45 AM |
| Should I use 'posts and categories' or 'custom post types'? | joshstauffer | General Discussion | 7 | 10-04-2010 09:11 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us