- This topic has 3 replies, 3 voices, and was last updated 7 years, 3 months ago by
gabzon.
-
AuthorPosts
-
-
November 11, 2014 at 2:39 pm #2755
bensMemberHello all,
I’m working on a website and I need to add different categories into a custom post type. Would somebody be able to point me in the right direction? I checked out documentation and I couldn’t see anything.. unless I’m being stupid?
Thanks
Ben.
n.b I’m using a plugin to achieve the custom post types instead of directly into WordPress.
-
November 11, 2014 at 3:55 pm #2756
SteveKeymaster@bens– I assume you mean you want to add a custom taxonomy to a custom post type, correct? We do this in the built-in Piklist Demo. This doc will show you how to register a custom taxonomy to a custom post type.
Let us know if that helps.
-
November 12, 2014 at 5:24 am #2765
bensMemberHi Steve, thats sort of what is required. I am talking to somebody with experience with Piklist today and if I find another way of doing it I will post it back here!
Many Thanks
Ben.
-
November 12, 2014 at 10:01 am #2766
gabzonMemberHi Ben,
If you need “sort of” more help, you need to explain to us a bit more next time. Creating CPTs and attaching categories to it are usually simple tasks.
You mention that you have created your own CPT using a plugin, which plugin are you using? (wp-types, Custom Post Type UI??). Check on your plugin if you have an option to add taxonomies. If they do, you can added directly from there.
Do you want to create a custom taxonomy or simple use the default wordpress taxonomies?If you want to create your own taxonomy (categories or tags) the wordpress way, then check this website: http://generatewp.com/taxonomy/
and check this line!
register_taxonomy( 'taxonomy', array( 'YOUR_OWN_CPT' ), $args );
-
-
AuthorPosts
- You must be logged in to reply to this topic.