Font Awesome changing default WordPress Font

It was not Font-Awesome that changed the default WordPress Style. I also use Bootstrap. One file called scaffolding.less overrides the WordPress defaults with: // Body reset html { font-size: 10px; -webkit-tap-highlight-color: rgba(0,0,0,0); } body { font-family: @font-family-base; font-size: @font-size-base; line-height: @line-height-base; color: @text-color; background-color: @body-bg; } I just added this to my custom CSS File … Read more

Where is the right place to register/enqueue scripts & styles

Why registering and queuing properly matters it should be in time – earlier than script/style is up for being output to page, otherwise it is too late; it should be conditional – otherwise you are loading stuff where you don’t need it and cause performance and functionality issues, for this you need WP environment loaded … Read more

Adding Font Awesome to WP Plugin

Did you create wp-plug-in/wp-plug-in.php file in plugins folder and added this following code. <?php /** * Plugin Name: Load FontAwesome * Version: 1.0 */ /* Exit if accessed directly */ if ( ! defined( ‘ABSPATH’ ) ) exit; function wp_styles() { wp_register_style( ‘font-awesome’, plugins_url( ‘wp-plug-in/css/font-awesome.min.css’ ) ); wp_enqueue_style( ‘font-awesome’ ); } add_action( ‘wp_enqueue_scripts’, ‘wp_styles’ ); … Read more

Using wp_register_style to load CSS in footer?

Technically styles should only be output in head and outputting them elsewhere is invalid HTML (browsers are however very lax about it and don’t care much). So in best interest of standards WordPress wouldn’t do something like that. Right? Right!? It does without bit of remorse actually. There is print_late_styles() function, running in footer that … Read more

Changes in enqueued / registered stylesheet paths not updating—why?

At long last, I have identified the issue. The theme I was working in used the Minikit theme starter, which has a function that strips version numbers. function minikit_remove_wp_ver_css_js($src) { if (strpos($src, ‘ver=”)) $src = remove_query_arg(“ver’, $src); return $src; } Naturally, the version numbers returned once I stopped calling this function.