How to approach a site where it has sub-businesses, each with its own pages (“articles”, “staff”)? Don’t want to use WP multisite

Logic suggests that: “Services” is taxonomy. “Catering” and “Wedding” are parent terms. “Staff” and “Articles” are child terms. “About Parent Term”, “Person N” and “Article N” are either CPTs, posts or pages. “About Us”, “Our Staff” and other accessories are the set of hierarchical pages or whatever.

Dynamic CPT / Taxonomy

If your custom taxonomies are unique to the custom post type, then you can set post type to an array ie post_type => array(‘cpt1’, ‘cpt2’), knowing that the taxonomy filter will only return the relevant post types. Secondly, in your tax_query, change catcocktails to get_queried_object()->taxonomy which will make it “dynamic”.

Custom Post Type Categories URL not displaying posts

You are specifying the same slug of destinations for both your custom post type and for your taxonomy, unfortunately by default this doesn’t behave how you’d expect due to WordPress’ rewrite API. Which caters for the default nature of posts, archives, taxonomies, slugs and the WordPress template hierarchy. If this URL structure is not important … Read more

Get parent category(taxonomy) ID from single template of a custom post type

Get Object Terms : Retrieves an array of WP_Term object associated with the given post, in the supplied taxonomies. Term object ( WP_Term )offers some handy information. For example, Gives you term slug: e.g.: term-slug-example $slug = $term->slug; Gives you term name: e.g. Term Name Example $name = $term->name; Gives you term description: e.g. This … Read more