How to change post status link order(priority) on cpt listing page

Turns out you can use this filter to alter the priority of the post_status links: https://github.com/WordPress/WordPress/blob/5c6b63d3a6874743542d6cede307c98ee370af23/wp-admin/includes/class-wp-list-table.php#L378 $views = apply_filters( “views_{$this->screen->id}”, $views ); If your custom post type is ‘inbound-email’ then the applied filter will look like this: add_filter( ‘views_edit-inbound-email’ , ‘function_to_filter_priority’ ); /** * rebuild priority of post status links * @param ARRAY $links * … Read more

How to query all custom posts of a certain type and checking what category they have

Alright I figured it out! $args = array( ‘post_type’ => ‘vendors’, ‘order’ => ‘asc’, ‘orderby’ => ‘title’, ); $query = new WP_Query( $args ); if ( $query->have_posts() ) { echo ‘<ul>’; while ( $query->have_posts() ) { $query->the_post(); $category = get_the_category(); echo ‘<li class=”‘; echo $category[0]->category_nicename; echo ‘”>’ . get_the_title() . ‘</li>’; } echo ‘</ul>’; } … Read more

Get custom taxonomy name from custom post

Blueprint Get all taxonomies. Loop through them. Get terms for current post. Code // Suppose you already have $post foreach ( get_object_taxonomies( $post ) as $taxonomy ) { foreach ( get_the_terms( $post->ID, $taxonomy ) as $term ) { // Do whatever you’d like with $term echo $term->name; } } References get_object_taxonomies get_the_terms