Wordpress Custom Post Type categroies - wordpress

I have a custom post type called STORIES.
When a user adds a new STORY, I need them to be able to assign a category (or multiple categories) to the post so I can sort them later by category.
To do this, I only want specific categories I assign to the STORY posts to show - NOT all of the wordpress categories attached to every post type.
For example the default Wordpress category is 'Uncategorized'. How do I remove this category (and any othersI don't want) to ONLY show the ones I select via the custom post type editor?
Is there any way I can make this happen?
I am using custom Post Types UI with Advanced Custom Fields.

You can do that with Post Types UI, You will need to create a new taxonomy.
Here is the screenshot explaining that
https://s.w.org/plugins/custom-post-type-ui/screenshot-4.png?r=1180724
Just fill the text boxes with appropriate names, and check STORY under
"Attach to Post Type" option.
After that you will have custom taxonomy like "Story Category" to use for stories only.

Related

How to change custom taxonomy terms order per post in Wordpress without plugin

I have to order my custom taxonomy terms per post. So, I have to change order of taxonomy terms that related custom post type posts while post displaying.
I have a custom post type that called "article" and I have a custom taxonomy that called "article-author". So an "article" can have more than one "article-authors". No problem so far.
But when display an article, related article-authors order by name. But I have to sort article-authors by custom order and I have to define it's order before the article saved (if possible... or not, can change it after saved).

Add Custom Post Type Custom Fields to WordPress Search

I've created a custom post type for a client (gravesite), and it has several custom fields to fill out ('bcva_branch_text', 'bcva_rank', 'bcva_start_serve', 'bcva_end_serve', 'bcva_dob', 'bcva_dod', 'bcva_cemetary', 'bcva_latitude', 'bcva_longitude').
The client wants these fields to be searchable, but I'm having trouble finding a way to do it. The WordPress Search will search the custom post type's title and 'editor' fields, but how do I get WP to search the added custom fields as well?
Thanks!
The Custom Fields Search plugin looks like it will do what you need. It seems to let you choose which custom fields will be included in search.

wordpress custom taxonomy display in post edit screen

I have installed the Custom Post Type UI plugin, and created a new CPT called 'Holidays'.
I then created a custom taxonomy called 'Type'.
Fine so far and both appear where they should in the menu.
What I then want to do, is add a few items in the 'Type' taxonomy (ski, sun, divng, camping etc...). With the normal WP categories, I know you add new ones when editing the post, these will build up, then you can select (or rather deselect) the ones you don't want the post to be associated with.
Q:I don't want the user to be able to add these, but rather offer a list of pre-defined choices, that I would input from the 'manage custom taxonomy' in the plugin menu. However any I add there just don't show up in the edit post page.
Resolved!
The plugin by default treats taxonomy as 'tags'... to get them to behave like 'categories' so you can select from a list, you must set hierarchy to 'true' in the advanced custom taxonomy options (in the plugin).

How to limit the number of taxonomy values in a Wordpress post?

I have defined a series of custom post types (namely "PortfolioPage" and "PortfolioGallery").
Each of them uses a custom taxonomy called "Artist".
Is there any way to limit the end-user to enter AT MOST ONE artist per PortfolioPage / PortfolioGallery post?
You could cause the custom taxonomy to use radio buttons rather than checkboxes, have a look here: https://wordpress.stackexchange.com/questions/7456/altering-the-appearance-of-custom-taxonomy-inputs

Using WordPress Content Item as a Taxonomy

Is there a way (or a plugin) to make a given content type in WordPress (i.e. posts, pages, media, custom post types) act as a taxonomy? I basically want to setup a one-to-many relationship of one item in a given post type to many items of a different type.
So basically, I have a custom post type, call it Authors. I want to use a Post Type rather than a taxonomy because I need a lot more meta data than a taxonomy allows.
I then have another custom post type called Books.
Is there a way to put a box similar to the Categories or Tags metaboxes on the Author write page that display a list of all the books. I can then choose from a list of all the books, thus creating a relationship.
If this doesn't already exist, I guess I'll write a plugin for it. I thought I'd give this a try first, just in case.
Have you considered adding new meta fields to a custom taxonomy? Unfortunately, you ned to either create a new table for the meta storage or use wp_options, but it does work and is relatively future-friendly. Remember to start your option names with an underscore, though.
http://www.strangework.com/2010/07/01/how-to-save-taxonomy-meta-data-as-an-options-array-in-wordpress/

Resources