How do you use a CPT as the default home page?

Thanks to @toscho for the useful answer, but it felt a bit hackish to me, so I poked around a bit and figured out I could add a filter instead: function wpa18013_add_pages_to_dropdown( $pages, $r ){ if(‘page_on_front’ == $r[‘name’]){ $args = array( ‘post_type’ => ‘stack’ ); $stacks = get_posts($args); $pages = array_merge($pages, $stacks); } return $pages; … Read more

What Is The Use Of map_meta_cap Filter?

This filter allows you to extend the map_meta_cap() function. This function is called by WP_User->has_cap() to convert a meta capability to one or more primitive capabilities. For example, you want to know whether the current user should be allowed to edit the current post, the edit_post meta capability. This depends on some factors: is the … Read more

numberposts? showposts? posts_per_page?

In my opinion, deprecating numberposts would not make sense, as numberposts is used to query x amount of posts, whilst posts_per_page is used to denote how many posts per page are being shown during pagination. If you were to deprecate numberposts in favor of simply posts_per_page, then pagination would not exist. ie: “numberposts” => 50, … Read more

is_plugin_active function doesn’t exist

That’s because the file in which is_plugin_active() is defined – wp-admin/includes/plugin.php – is only loaded in the admin, after your plugin is loaded. Thus, you can only call it after ‘admin_init’ has fired: function check_some_other_plugin() { if ( is_plugin_active(‘some-plugin.php’) ) { … } } add_action( ‘admin_init’, ‘check_some_other_plugin’ );