Custom posts of one type have disappeared from admin. Still appear on site [closed]

Solved! For some reason I had changed the name of my custom post type slightly, in my register_custom_post_types.php file register_post_type(‘programmes’, array( I changed the name back and they reappeared… I’ve learnt to keep in mind how changes to things can affect WP’s ability to retrieve data Edit: On further investigation it appears that the custom … Read more

Show all Tags in each post

Considering you mention having registered a custom taxonomy instead of using the native tags, the functions the_tags() and get_tags will not work. you need to get your custom taxonomy terms by using get_the terms(). Usage is not much different from using native tags, but you have to pass the post_type as a variable. See the … Read more

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”.