Deregister CSS style link ‘open-sans-css’

When user is logged in WP add in its footer this CSS: <link rel=”stylesheet” id=’open-sans-css’ href=”https://fonts.googleapis.com/css?family=Open+Sans….” type=”text/css” media=”all” /> That style is not registered inside my theme, if I change my theme I still have that file called in any theme, it is somewhere inside WP core files. How to remove it? 2 Answers 2 … Read more

Hide Front-End Admin Bar Including 32 px Spacing

I have a custom template and I inserted the following snippet to get rid of the admin bar for the page: function hide_admin_bar(){ return false; } add_filter( ‘show_admin_bar’, ‘hide_admin_bar’ ); The problem is this still leaves a blank white empty bar at the top of the page with a height of 32px. Looking at core, … Read more

What is better way to use Bootstrap inside admin panel?

I need to use Bootstrap CSS for better UI in wp-admin but if I enqueue the bootstrap.css, it’s affecting the admin default UI by changing background colors, etc. How can I use bootstrap.css inside wp-admin? 2 Answers 2 As @N00b said, if a selector matches between bootstrap and wordpress, and is more specific, then it … Read more

How to add custom css to login and admin?

I have custom CSS for the login and admin pages. Is it OK to add it as I’ve done below, or is there a better alternative? function custom_admin_css() { wp_enqueue_style( ‘custom_admin_css’, get_template_directory_uri() . ‘/css/admin.css’, array(), filemtime( get_template_directory() . ‘/css/admin.css’ ) ); } add_action( ‘login_enqueue_scripts’, ‘custom_admin_css’, 10 ); add_action( ‘admin_enqueue_scripts’, ‘custom_admin_css’, 10 ); 3 Answers 3 … Read more

How do i use fontawesome icons in TinyMce editor?

I’m trying to add a youtube button in TinyMce editor. here is a recent-posts.js file which is in the js folder of the theme directory. (function() { tinymce.create(‘tinymce.plugins.buttons’, { init : function(ed, url) { //for recent post button ed.addButton(‘recentposts’, { title : ‘Recent posts’, image : url + ‘/youtube.png’, onclick : function() { var posts … Read more