How to hide private posts even if user is admin
I can’t use is_singular( ‘my_post_type’ ) in pre_get_posts because the queried object is not set at this point. I can use instead the post_type query parameter.
I can’t use is_singular( ‘my_post_type’ ) in pre_get_posts because the queried object is not set at this point. I can use instead the post_type query parameter.
remove screenshot.png via dashboard
add_filter( ‘parent_file’, ‘parent_file_hover’ ); function parent_file_hover( $parent_file ) { global $pagenow; if ( $pagenow == ‘post.php’) $parent_file = “post.php?post={$_REQUEST[‘post’]}&action=edit”; elseif($pagenow == ‘post-new.php’) $parent_file = “post-new.php?post_type={$_REQUEST[‘post_type’]}”; return $parent_file; }
Can I retrieve Published changes when changes have been Saved but not Published in WordPress Semplice?
I was able to solve it with the following plugin: https://wordpress.org/plugins/adminimize/
cannot access the wordpress dashboard after changing the site url
Use this example function my_admin_bar_render() { $user = wp_get_current_user(); if ( in_array( ‘editor’, (array) $user->roles ) ) { global $wp_admin_bar; $wp_admin_bar->remove_menu(‘new-content’); } } add_action( ‘wp_before_admin_bar_render’, ‘my_admin_bar_render’ );
Ignore posts content in the posts queries for internal linking
There are not good/easy hooks to achieve this, but I think this is possible, just needs some work. I can give you general direction and some ideas. You can use hooks on nav_menu_items_page and nav_menu_items_page_recent to return array of posts with changed title. They both may use the same function, like this function my_nav_menu_items($posts, $args) … Read more
Shop in Subdomain feeding main domain order in admin area