Why are my frontend theme styles bleeding into the backend?

I’m developing a custom theme. For some reason, some of the styles I define globally in the front-end (like certain styles for headings and such) are affecting the back-end. I am using the WP-LESS plugin and enqueueing the main stylesheet in the theme’s functions.PHP: wp_enqueue_style( ‘mainLESS’, get_template_directory_uri() . ‘/less/index.less’); Is this normal behaviour? How should … Read more

Hide Theme options and Customize Admin menu

Under the appearance admin menu, I have customizer added by the theme, and theme options added by a plugin. I’m using this code to hide both menus ( submenu’s of Appearance )for ALL admins apart from a certain USERNAME. function hide_menu() { global $current_user; $current_user = wp_get_current_user(); $user_name = $current_user->user_login; //check condition for the user … Read more

To remove default dashboard items and add quick draft widget for custom post type

i want to remove screen options from wordpress admin panel and remove default dashboard items and add quick draft widget in dashboard for custom post type “gallery”. 2 Answers 2 You can remove the Screen Options with the ‘screen_options_show_screen’ filter. function myplugin_disable_screen_options( $show_screen ) { // Logic to allow admins to still access the menu … Read more

Custom height/width for thickbox in WP Backend

I use thickbox in the WP backend for preview or other content. On own pages in the backend works my script very fine and a can use custom width and height for the thickbox. below my code: <script type=”text/javascript”> <!– var viewportwidth; var viewportheight; if (typeof window.innerWidth != ‘undefined’) { viewportwidth = window.innerWidth-80, viewportheight = … Read more