Custom post type menu button color

If I’m understanding correctly what your wanting to do you’ll need to override the CSS that is in /wp-admin/css/colors-fresh.css. To change the default state of a single button you can just add CSS like this #menu-posts-testimonials-widget { background: red; } this is an example with the testimonial widget plugin you can inspect the element to … Read more

custom post types missing ADD NEW

You can’t see the menus you expect because the capabilities have not been registered. These: $capabilities = array( ‘edit_post’ => ‘edit_partner’, ‘read_post’ => ‘read_post’, ‘delete_post’ => ‘delete_partner’, ‘edit_posts’ => ‘edit_partners’, ‘edit_others_posts’ => ‘edit_others_partners’, ‘publish_posts’ => ‘publish_partners’, ‘read_private_posts’ => ‘read_private_partners’, ); All of those capabilities with “partner” in them do not exist by default. For a … Read more

CMB select with data from CPT

Use a function that returns an array of arrays that the options field expects. Something like this (untested code): array( ‘name’ => ‘Test Select’, ‘desc’ => ‘field description (optional)’, ‘id’ => $prefix . ‘test_select’, ‘type’ => ‘select’, ‘options’ => get_myposttype_options(‘myposttype’), ), function get_myposttype_options($argument) { $get_post_args = array( ‘post_type’ => $argument, ); $options = array(); foreach … Read more

Use different categories for a custom post

Do you mean having different taxonomies for your custom post types? If so, you can define custom taxonomies and apply this taxonomies only to the post types you want. If the custom taxonomy has “hierarchical” argument set to true, the taxonomy will be works the same way categories do. register_taxonomy( ‘my_taxonomy_name’, ‘my_custom_post_type’, array( ‘hierarchical’ => … Read more

Query Custom Posts – Add To Selection

Use wp_reset_postdata(); to restore the global $post variable of the main query loop after a secondary query loop using new WP_Query. It restores the $post variable to the current post in the main query. call wp_reset_postdata(); after endwhile; <?php while($org->have_posts()) : $org->the_post(); ?> <option value=”<?php echo $post->post_name; ?>”><?php the_title(); ?></option> <?php endwhile; // reset main … Read more