How do I require the specification of term in a custom post type and custom taxonomy?

I’m working on something similar at the moment. I’ve decided on using radio buttons or a dropdown to ensure a user has to pick from my taxonomy terms when creating their post. I’m still refinig my solution, but these two articles have helped me a lot: http://themefoundation.com/wordpress-meta-boxes-guide/ I want my metabox to appear in multiple … Read more

How to set taxonomy hierarchical level to 2?

You can’t set a level when you create the taxonomy. The only way to enforce a level is by watching the term creation: Filter create_term; that’s the earliest filter that allows us to change parent term ID. For no obvious reasons the filter pre_insert_term is lacking that information … it would probably too easy. Then … Read more

Remove categories from post edit page, but keep in sidebar?

You can hide them in the Screen Options dropdown (which is a per-user basis) if that’s what you’re looking for: You could also remove the metaboxes with remove_meta_box seen here: https://codex.wordpress.org/Function_Reference/remove_meta_box So depending on what the HTML ID of that custom box is, you could add a function. Let’s say Client Types is client-types, then … Read more

How to have this permalink structure: post_type/postname/custom_inner_page

Register your taxonomy first and set the argument slug and rewrite rules to your slug which is city Register your post type with slug of your taxonomy city prefixed and make sure you set the has_archive argument to taxonomy. Now add a filter to post_type_link to make the stores show the individual permalink. register_post_type( ‘city’, … Read more