Changing a post status name

I think the only way is to Change it’s translation. From ‘Trash’ to ‘Archive’. But this can have side-effects. As I searched in the core file (modifying core-files is ALWAYS a BAD idea!!) there where no filter called, wich you coul hook into to Bypass…

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 filter posts in admin by before date or by post status ‘future’?

The question pretty much got covered in another thread here. In case anyone else need anything like this I ended up using following code to hide all the posts that are over a week in the future. function hide_future_posts($where, $q) { if(is_admin() && $q->is_main_query() && !filter_input(INPUT_GET, ‘post_status’) && ( $screen = get_current_screen() ) instanceof \WP_Screen … Read more

Custom Post Status & Taxonomies

Did you try adding a count callback? // Register Custom Taxonomy function custom_taxonomy() { $labels = array( ‘name’ => _x( ‘Taxonomies’, ‘Taxonomy General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘Taxonomy’, ‘Taxonomy Singular Name’, ‘text_domain’ ), ‘menu_name’ => __( ‘Taxonomy’, ‘text_domain’ ), ‘all_items’ => __( ‘All Items’, ‘text_domain’ ), ‘parent_item’ => __( ‘Parent Item’, ‘text_domain’ ), … Read more

Implement post status update as frontend news announcement

Hope this can help: function wpse_display_post_counts_by_categories() { $categories = get_categories(); $container = []; foreach ($categories as $category) { $args = [ ‘post_type’ => ‘post’, // Change to your post type. ‘post_status’ => ‘publish’, ‘category’ => $category->term_id, ‘orderby’ => ‘post_date’, ‘order’ => ‘DESC’, ‘posts_per_page’ => -1 ]; $posts = get_posts($args); if ( count($posts) ) { // … Read more

Modify loop to include all post statuses not just ‘published’

Okay, I think to start you need to change line 470 of the file includes/admin/class-learndash-admin-binary-selector.php from: ‘post_status’ => array(‘publish’), to ‘post_status’ => array(‘any’), If this doesn’t work on its own, there may be other places you need to change this as well – do a global file search on ‘post_status’ and look for places where … Read more