Changing add_action('wp_head',...) execution priority? (3 posts)

  1. Trahald
    Posted 7 years ago #

    I'd like to override the styles set by theme stylesheets, without editing the stylesheets themselves.

    However when I do this by adding an action to wp_head, the action executes prior to the head section where the theme stylesheets are set. So the CSS in the theme stylesheets overrides the CSS in my custom action.

    add_action('wp_head', 'header_css_style');
    function header_css_style()
    	echo "<style type=\"text/css\">
    body { background-color: #FFFFFF; }

    Is it possible for me to add CSS styling to the header that executes after the theme stylesheets are set?

  2. Trahald
    Posted 7 years ago #

    Still wondering about this :)

  3. johnkolbert
    Posted 7 years ago #

    Without moving the location of the wp_head() function in the theme itself, I don't think so, at least not that I know of. Sorry!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.