Tag Info

Hot answers tagged

2

You want the first parameter ($post_type) of register_post_type() – by default this is used for the "slug", so in your case it's: content-block The name and singular-name labels you refer to are just for display purposes – see get_post_type_object() for an example. So this should work (note I've not tested the rest of your advert code): if (! is_single() ...


2

I found a way to get it done but I am not very happy with this procedure. Please add your answer if you find better way. Mean while, this might be of help. add_action('admin_head-edit.php','addCustomImportButton')); I only need this on edit page, so I am using admin_head-edit.php action, but you can use admin_head or some other (not very specific ...


1

The problem was 'exclude_from_search' => true in the register_post_type options. Given that setting 'public' => true defaults to exluding from search by default I assumed that this was the correct setting. However this is in the WordPress codex for register_post_type exclude_from_search: Note: If you want to show the posts's list that are ...



Only top voted, non community-wiki answers of a minimum length are eligible