Multiple Wordpress Custom Post Types within WP Admin Menus Multiple Wordpress Custom Post Types within WP Admin Menus wordpress wordpress

Multiple Wordpress Custom Post Types within WP Admin Menus


Solution is:

  1. Accommodation / Things to do will be template pages

  2. These templates within the admin section will have an option to list the desired post types according to a) post types and b) optionally, further taxonomies

  3. On the front end template, use a code similar to the one below to collect the right data


global $post;$serialised_post_types = get_post_meta($post->ID,'post_types_to_list',true); //i.e. a serialised array('hotel','bnb');$serialised_post_types = unserialize($serialised_post_types);$args = array('post_type' => $serialised_post_types); //basic args$res = new WP_Query($args);