remove_action conditionally for Custom Post Type

Query variable only can be accessed after wp_query has been called. In you call, the get_post_type() function is actually returning an empty value. It should be working, if you change the hook to something which fires after wp_query is called. So, You should use – add_action(‘wp’, ‘kiwi_remove_post_author_box’); OR add_action(‘template_redirect’, ‘kiwi_remove_post_author_box’); Also, hooks can removed with … Read more

Possible to add another setting to ‘Front page displays’ setting for Custom Post Type

It appears that the options-reading.php file is hard-coding its options, rather than using the Settings API. And that option is using wp_dropdown_pages() specifically. The Codex lists the following arguments for wp_dropdown_pages(): <?php $args = array( ‘depth’ => 0, ‘child_of’ => 0, ‘selected’ => 0, ‘echo’ => 1, ‘name’ => ‘page_id’); ?> The Codex page also … Read more