Hello!
I'm trying to filter (or hook?) the header so that the thematic_create_stylesheet() call is after wp_head().
At the moment I just have header.php copied into my childtheme with everything re-ordered. Seems like the simplest fix. However, I'd love to know how to do this using either a filter or a hook (or is that appropriate?)?
I attempted using an add_filter:
function my_styles_first() {
//move the hook for my style to the last
// Creating the doctype
thematic_create_doctype();
echo " ";
language_attributes();
echo ">\n";
// Creating the head profile
thematic_head_profile();
// Creating the doc title
thematic_doctitle();
// Creating the content type
thematic_create_contenttype();
// Creating the description
thematic_show_description();
// Creating the robots tags
thematic_show_robots();
// Creating the canonical URL
thematic_canonical_url();
if (THEMATIC_COMPATIBLE_FEEDLINKS) {
// Creating the internal RSS links
thematic_show_rss();
// Creating the comments RSS links
thematic_show_commentsrss();
}
// Creating the pingback adress
thematic_show_pingback();
// Enables comment threading
thematic_show_commentreply();
// Calling WordPress' header action hook
wp_head();
// Loading the stylesheet
thematic_create_stylesheet();
}
add_filter( 'get_header', 'my_styles_first' );
Then I attempted to unhook the thematic_create_stylesheet completely so I could add it after wp_head... but I wasn't sure how I'd do that either. Anyway, this didn't work so I gave up:
function unhook_stylesheet_position() {
//remove custom style sheet
remove_action('get_header','thematic_create_stylesheet');
}
add_action('init','unhook_stylesheet_position');