No Authors for custom post type

You need to include the post type in the pre_get_post filter: (Not sure about global $user_ID;, just reproduce that part of your code) function content_for_current_author($query) { if($query->is_admin) { global $user_ID; $query->set(‘author’, $user_ID); $query->set( ‘post_type’, array(‘acf’, ‘another-custom-pot’, ‘page’, ‘post’) ); } return $query; } add_filter(‘pre_get_posts’, ‘content_for_current_author’); Details in WP Query documentation for Type Parameter Also, your … Read more

How to deregister scripts all at once

Its already answered on this link <?php //To remove all script from the page function remove_all_scripts() { global $wp_scripts; $wp_scripts->queue = array(); } // to remove all stylesheet add_action(‘wp_print_scripts’, ‘remove_all_scripts’, 100); function remove_all_styles() { global $wp_styles; $wp_styles->queue = array(); } add_action(‘wp_print_styles’, ‘remove_all_styles’, 100); ?> It will remove all the scripts enqueued by standard method. Manual … Read more

Script work on non logged in user but not work for logged in user?

i finally know why this code not work. as menstioned by Jorn Lund in the comment that jQuery(document).ready() will fail when script loaded async ( i still dont know is my code load async) but with in mind i change from jQuery(document).ready() to self execution function (function($){ alert(“hello”); })(jQuery); and the code work very well … Read more