How to redirect if is post edit or publish page?

For what you want to achieve, using the id instead of post-type should do the job. Try this: add_action(‘admin_menu’, ‘custom_redirect_function’); function custom_redirect_function() { $screen = get_current_screen(); if ( $screen->id == “edit-post” ) { wp_redirect( site_url() ); exit(); } } References: get_current_screen wp_redirect

On WordPress Search, how to search post from Author meta also

You can start with prepare information what you need using MySQL SELECT * FROM `wp_usermeta` WHERE `meta_key` = “description” For example, you can create the file with the prepared output of your custom query and then use jQuery * Ajax for your search box.. I’ve show you sample of json file: <?php require_once(‘../../../wp-load.php’); $gm = … Read more