Creating a WP plugin for third party usage (first time doing this), and typically links to stylesheets are put in the header or in the theme generated options panel. That’s fine for personal use but not for this.
I found wp_enqueue_style via a search on here, and I’m trying to apply it. Below is the code I have right now.
function wpse_load_plugin_css() {
$plugin_url = plugin_dir_url( __FILE__ );
wp_enqueue_style( 'style', $plugin_url . 'style.css' );
}
add_action( 'wp_enqueue_scripts', 'wpse_load_plugin_css' );
function test() {
global $con;
wp_enqueue_style('style');
** the bulk of my code - query and output **
}
None of my styling is working at this point. I’ve cleared the cache, and this early stage, just trying to change the size of fonts.
Am I on the right track?
Thank you.