Custom Post Type Metadata Not Saving

The primary issue is your save_post action isn’t firing because: add_action( ‘save_post’. ‘save_meta’, 10, 2 ); should be add_action( ‘save_post’, ‘save_meta’, 10, 2 ); You also have inconsistency between client-name and _client_name, but without seeing the field_value function, I’m not sure if that’s a problem or not. I would also use something more unique than … Read more

Display custom post types in wp_list_pages

To simplify things, first make your archives actual Archives – not Pages. That will help you later on in listing the correct content. unregister_post_type(‘blog’); unregister_post_type(‘event’); unregister_post_type(‘news’); Unregistering the post type won’t delete any content, it will just ensure that when you re-register them, the settings will take effect. Tweak your register_post_type calls which should look … Read more

WordPress Custom Post Type – show only certain posts that have specific taxonomy set

So basically your question can also be put as: show all posts if the post have been assigned any term from taxonomy. SO this code shoudl do : $args = array( ‘post_type’ => ‘food_dish’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘menu’, ‘field’ => ‘name’, ‘terms’ => array(‘premium’, ‘children’, ‘concept’), ), ), ); If you feel … Read more