How to add the “page” post type to Recent Activity widget displayed in admin?

Add page post type to your code (tested): add_filter( ‘dashboard_recent_posts_query_args’, function(array $queryArgs) { $postTypes = get_post_types([ ‘public’ => true, ‘capability_type’ => ‘post’, ]); $postTypes[] = ‘page’; if ( is_array( $postTypes ) ) { $queryArgs[‘post_type’] = $postTypes; } return $queryArgs; }, 15 ); The reason your original code did not include pages is because pages have … Read more

AJAX call not initializing for non-admins in WordPress

There are several potential reasons for this issue: Permissions: Non-admin users may not have the necessary permissions to access the admin-ajax.php file, which is being called in your AJAX request. Make sure that the required permissions are set for the user roles other than admin. Authentication: Non-admin users may not be authenticated to access the … Read more