We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

0

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 $...


0

This would work for editors. You can swap the role in and out depending on which role you are trying to target (e.g., editor, subscriber, etc.). This would go in functions.php of your child theme. function remove_menus(){ // get current login user's role $roles = wp_get_current_user()->roles; // test role if( !in_array('editor',$roles)){ return; } //...


0

I've figured it out how to do it on my custom admin page. You can use default wordpress classes and get variable trickery like so: <?php if( isset( $_GET[ 'tab' ] ) ) { $active_tab = $_GET[ 'tab' ]; } // end if ?> <h2 class="nav-tab-wrapper"> <a href="?page=sandbox_theme_options&tab=display_options" class="nav-tab &...


0

It turned out that there was already a .card class from wp that had some extra attributes than bootstrap's so they were overriding it.


0

If your bootstrap.css is loaded correctly with the admin_enqueue_scripts action, there might be a stricter selector in an other css file which overrides your style. The stylesheet with the most precisely selector wins the battle of styling your element.


Top 50 recent answers are included