my custom css file downloads then it STOPS!
It looks like all you need is to add a trailing slash so the directory is correct. Solution: change ‘style.css’ to ‘/style.css’ in your second wp_register_style() call on line 7.
It looks like all you need is to add a trailing slash so the directory is correct. Solution: change ‘style.css’ to ‘/style.css’ in your second wp_register_style() call on line 7.
IF you want the CSS to be in your plugin’s settings page, you should be using this action: admin_enqueue_scripts, as the action you are currently using is for the front end. add_action( ‘admin_enqueue_scripts’, array($this, ‘register_plugin_styles’ ));
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
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
How do I view registered syles and scripts for enqueue
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
How to force that styles are enqueued in the header?
How to enqueue JavaScript file that depends on CSS stylesheet
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
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.