nomadgraphix
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Encountered Error with Fresh 4.2 Multisite InstallTo fix this issue…I downloaded a legacy version of WordPress. Apparently, this is a real issue within the WordPress build.
Forum: Hacks
In reply to: Passing variables into a wordpress hook.Keesiemeijer,
This is fine, but I want to add the stylesheet before all scripts…and I want a simple statement at the beginning of each template:
add_stylesheet(‘home.css’);
That is why I am using a custom hook.
Forum: Hacks
In reply to: Passing variables into a wordpress hook.Hey Jan,
Thanks for the response.
Your solution works flawlessly!
but…
I am using a custom hook to add my stylesheets the the header because I am attempting to improve my site performance by having this order in my header:
1. Stylesheets
2. Other <link> tags.
3. ScriptsMy custom hook code in my function.php file is:
if(!function_exists('stylesheet_hook')): function stylesheet_hook() { do_action('stylesheet_hook'); } endif;Then, my header has the hook right after the main stylesheets:
<link rel="shortcut icon" href="<?php bloginfo('template_url') ?>/images/logo.ico" /> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/nivo-slider/nivo-slider.css" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/nivo-slider/themes/default/default.css" type="text/css" media="screen" /> <?php stylesheet_hook(); ?>Which hook in the header does wp_enqueue_style() use? The “enqueue_script()”?