How do I limit the status options for bulk/quick edit to only Published and Draft?

For my custom post type, I only want to have “Published” and “Draft” as the available options in the bulk edit and quick edit screens, i.e. I tried hooking on to the filter quick_edit_dropdown_pages_args but it doesn’t seem to get fired. I inserted a wp_die() in my callback but the admin screen lists all posts … Read more

Problem duplicated shortlinks bitly

I’ve this plugin to create shortlink using the bitly API, but there’s a problem! function yoast_bitly_shortlink($url, $id, $context, $allow_slugs) { if ( ( is_singular() && !is_preview() ) || $context == ‘post’ ) { $short = get_post_meta($id, ‘_yoast_bitlylink’, true); if ( !$short || $short == ” ) { if ( !defined(‘BITLY_USERNAME’) || !defined(‘BITLY_APIKEY’) ) { $short=”http://yoast.com/wordpress/bitly-shortlinks/configure-bitly/”; … Read more

How to display future posts – modified query still yields 404

I have a very strange problem and I am stuck. I want the single page to display posts with the post_status of publish and future. So I added this code to my functions.php in my theme: function display_future_posts() { global $wp_query; if( !is_admin() && $wp_query->is_main_query() && $wp_query->is_single()) { $wp_query->set( ‘post_status’, array(‘future’, ‘publish’, ‘draft’) ); } … Read more

$error = 404 after caught add_rewrite_rule

I have a rewrite rule as this to caught old urls from a previous version of the site: add_rewrite_rule( ‘(ninos|familia|hogar|mujeres|hombres)-[a-z-]+\.php’, ‘old_id_redirect.php’, ‘top’ ); The rewrite rule works more or less as intended, and I see in the debugger that the request goes through old_id_redirect.php. In there, there is only (so far) a call to wp-blog-header.php, … Read more

Get images only if parent status is publish

I have a site which uses a custom template page for each image, and users can favorite an image. I am then pulling a page of most favorited images: $args = array( ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image/jpg’, ‘post_status’=>’inherit’, // there for testing ‘meta_key’ => ‘favorites’, ‘orderby’=>’meta_value_num’, ‘order’=>’DESC’, ‘posts_per_page’=>25, ‘nopaging’ =>true ); $query = new … Read more

Getting the different post statuses + count like in edit.php, in a custom submenu page

I’m trying to create a submenu page for reordering posts/pages. Right now I’m trying to include the list that display the different post statuses, for example: All (5) | Published (4) | Draft (1) I was digging around in edit.php and found that it pulls the list like this: $wp_list_table->views(); Which lead me to class-wp-list-table.php … Read more