3 added 38 characters in body
source | link

Since WP 4.7 the WP dashboard includes a CSS customizer (Appearence->Cusomize->Additional CSS). This might be a solution for your theme specific CSS as WP adds the style block to <head> after enqueued CSS and possibly other additions by theme.

Normal practice as per Cedons enqueing answer or jimihenrik's comment should work.

However; it appears this theme needs a "non-standard" solution (I like your JS solution) - alternatives include an edited copy of header.php in child theme.

"an internal stylesheet is added to the page's <head>"

The theme could be adding in a variety of ways in header.php e.g. hard coding; via a theme "action hook"; via wp-head

The last part of header.php typically contains:

<?php possibly_themes_own_action_hook(); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
  Some HTML for header and navigation & other stuff prior to Loop adding say H1 title

If theme does not have header.php or it is missing </head> then relevant code is probably in templates.

In your child header.php just above </head> (if not present see below) you could either:

  • hard code your CSS or stylesheet link above </head>
  • or <php include('path/to/mycss.css');?>

  • or add your own action:

     my_add_to_head(); 
    

    and in your functions.php

     function my_head_function() {
     ?>
     <style>.hero-description {border:1px solid #c00;}</style> 
     <?php
     // or stylesheet link or file_get_contents to get css file and echo
     // + any other stuff you want to add to head
     }
     add_action('my_add_to_head', 'my_head_function');
    

Solutions are bad practice especially if someone else ends up having to maintain but may be the best option with your theme.

"when i used wp_head, it ended up in the tag with all the JavaScript files."

If you mean within the body tag then there is a coding error in the theme. Otherwise it is "non-standard" design and could cause many plugins to "fail". Either wp_head(); is after the body tag or "wp_head" is used to insert <body> and maybe </head>.

If </head> is not in header.php or templates then adding the above "solutions" just above wp_head(); might still work but plugin issues will remain.

Since WP 4.7 the WP dashboard includes a CSS customizer (Appearence->Cusomize->Additional CSS). This might be a solution for your theme specific CSS as WP adds the style block to <head> after enqueued CSS and possibly other additions by theme.

Normal practice as per Cedons enqueing answer or jimihenrik's comment should work.

However; it appears this theme needs a "non-standard" solution (I like your JS solution) - alternatives include an edited copy of header.php in child theme.

"an internal stylesheet is added to the page's <head>"

The theme could be adding in a variety of ways in header.php e.g. hard coding; via a theme "action hook"; via wp-head

The last part of header.php typically contains:

<?php possibly_themes_own_action_hook(); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
  Some HTML for header and navigation & other stuff prior to Loop adding say H1 title

If theme does not have header.php or it is missing </head> then relevant code is probably in templates.

In your child header.php just above </head> (if not present see below) you could either:

  • hard code your CSS above </head>
  • or <php include('path/to/mycss.css');?>

  • or add your own action:

     my_add_to_head(); 
    

    and in your functions.php

     function my_head_function() {
     ?>
     <style>.hero-description {border:1px solid #c00;}</style> 
     <?php
     // or file_get_contents to get css file and echo
     // + any other stuff you want to add to head
     }
     add_action('my_add_to_head', 'my_head_function');
    

Solutions are bad practice especially if someone else ends up having to maintain but may be the best option with your theme.

"when i used wp_head, it ended up in the tag with all the JavaScript files."

If you mean within the body tag then there is a coding error in the theme. Otherwise it is "non-standard" design and could cause many plugins to "fail". Either wp_head(); is after the body tag or "wp_head" is used to insert <body> and maybe </head>.

If </head> is not in header.php or templates then adding the above "solutions" just above wp_head(); might still work but plugin issues will remain.

Since WP 4.7 the WP dashboard includes a CSS customizer (Appearence->Cusomize->Additional CSS). This might be a solution for your theme specific CSS as WP adds the style block to <head> after enqueued CSS and possibly other additions by theme.

Normal practice as per Cedons enqueing answer or jimihenrik's comment should work.

However; it appears this theme needs a "non-standard" solution (I like your JS solution) - alternatives include an edited copy of header.php in child theme.

"an internal stylesheet is added to the page's <head>"

The theme could be adding in a variety of ways in header.php e.g. hard coding; via a theme "action hook"; via wp-head

The last part of header.php typically contains:

<?php possibly_themes_own_action_hook(); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
  Some HTML for header and navigation & other stuff prior to Loop adding say H1 title

If theme does not have header.php or it is missing </head> then relevant code is probably in templates.

In your child header.php just above </head> (if not present see below) you could either:

  • hard code your CSS or stylesheet link above </head>
  • or <php include('path/to/mycss.css');?>

  • or add your own action:

     my_add_to_head(); 
    

    and in your functions.php

     function my_head_function() {
     ?>
     <style>.hero-description {border:1px solid #c00;}</style> 
     <?php
     // or stylesheet link or file_get_contents to get css file and echo
     // + any other stuff you want to add to head
     }
     add_action('my_add_to_head', 'my_head_function');
    

Solutions are bad practice especially if someone else ends up having to maintain but may be the best option with your theme.

"when i used wp_head, it ended up in the tag with all the JavaScript files."

If you mean within the body tag then there is a coding error in the theme. Otherwise it is "non-standard" design and could cause many plugins to "fail". Either wp_head(); is after the body tag or "wp_head" is used to insert <body> and maybe </head>.

If </head> is not in header.php or templates then adding the above "solutions" just above wp_head(); might still work but plugin issues will remain.

2 edited body
source | link

Since WP 4.7 the WP dashboard includes a CSS customizer (Appearence->Cusomize->Additional CSS). This might be a solution for your theme specific CSS as WP adds the style block to <head> after enqueued CSS and possibly other additions by theme.

Normal practice as per Cedons enqueing answer or jimihenrik's comment should work.

However; it appears this theme needs a "non-standard" solution (I like your JS solution) - alternatives include an edited copy of header.php in child theme.

"an internal stylesheet is added to the page's <head>"

The theme could be adding in a variety of ways in header.php e.g. hard coding; via a theme "action hook"; via wp-head

The last part of header.php typically contains:

<?php possibly_themes_own_action_hook(); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
  Some HTML for header and navigation & other stuff prior to Loop adding say H1 title

If theme does not have header.php or it is missing </head> then relevant code is probably in templates.

In your child header.php just above </head> (if not present - see below) you could either:

  • hard code your CSS above </head>
  • or <php include('path/to/mycss.css');?>

  • or add your own action:

     my_add_to_head(); 
    

    and in your functions.php

     function my_head_function() {
     ?>
     <style>.hero-description {border:1px solid #c00;}</style> 
     <?php
     // or file_get_contents to get css file and echo
     // + any other stuff you want to add to head
     }
     add_action('my_add_to_head', 'my_head_function');
    

Solutions are bad practice especially if someone else ends up having to maintain but may be the best option with your theme.

"when i used wp_head, it ended up in the tag with all the JavaScript files."

If you mean within the body tag then there is a coding error in the theme. Otherwise it is "non-standard" design and could cause many functionsplugins to fail"fail". Either wp_head(); is after the body tag or "wp_head" is used to insert <body> and maybe </head>.

If </head> is not in header.php or templates then adding the above "solutions" just above wp_head(); mightmight still work but plugin issues will remain.

Since WP 4.7 the WP dashboard includes a CSS customizer (Appearence->Cusomize->Additional CSS). This might be a solution for your theme specific CSS as WP adds the style block to <head> after enqueued CSS and possibly other additions by theme.

Normal practice as per Cedons enqueing answer or jimihenrik's comment should work.

However; it appears this theme needs a "non-standard" solution (I like your JS solution) - alternatives include an edited copy of header.php in child theme.

"an internal stylesheet is added to the page's <head>"

The theme could be adding in a variety of ways in header.php e.g. hard coding; via a theme "action hook"; via wp-head

The last part of header.php typically contains:

<?php possibly_themes_own_action_hook(); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
  Some HTML for header and navigation & other stuff prior to Loop adding say H1 title

If theme does not have header.php or it is missing </head> then relevant code is probably in templates.

In your child header.php just above </head> (if present - see below) you could either:

  • hard code your CSS above </head>
  • or <php include('path/to/mycss.css');?>

  • or add your own action:

     my_add_to_head(); 
    

    and in your functions.php

     function my_head_function() {
     ?>
     <style>.hero-description {border:1px solid #c00;}</style> 
     <?php
     // or file_get_contents to get css file and echo
     // + any other stuff you want to add to head
     }
     add_action('my_add_to_head', 'my_head_function');
    

Solutions are bad practice especially if someone else ends up having to maintain but may be the best option with your theme.

"when i used wp_head, it ended up in the tag with all the JavaScript files."

If you mean within the body tag then there is a coding error in the theme. Otherwise it is "non-standard" design and could cause many functions to fail. Either wp_head(); is after the body tag or "wp_head" is used to insert <body> and maybe </head>.

If </head> is not in header.php or templates then adding the above "solutions" just above wp_head(); might still work but plugin issues will remain.

Since WP 4.7 the WP dashboard includes a CSS customizer (Appearence->Cusomize->Additional CSS). This might be a solution for your theme specific CSS as WP adds the style block to <head> after enqueued CSS and possibly other additions by theme.

Normal practice as per Cedons enqueing answer or jimihenrik's comment should work.

However; it appears this theme needs a "non-standard" solution (I like your JS solution) - alternatives include an edited copy of header.php in child theme.

"an internal stylesheet is added to the page's <head>"

The theme could be adding in a variety of ways in header.php e.g. hard coding; via a theme "action hook"; via wp-head

The last part of header.php typically contains:

<?php possibly_themes_own_action_hook(); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
  Some HTML for header and navigation & other stuff prior to Loop adding say H1 title

If theme does not have header.php or it is missing </head> then relevant code is probably in templates.

In your child header.php just above </head> (if not present see below) you could either:

  • hard code your CSS above </head>
  • or <php include('path/to/mycss.css');?>

  • or add your own action:

     my_add_to_head(); 
    

    and in your functions.php

     function my_head_function() {
     ?>
     <style>.hero-description {border:1px solid #c00;}</style> 
     <?php
     // or file_get_contents to get css file and echo
     // + any other stuff you want to add to head
     }
     add_action('my_add_to_head', 'my_head_function');
    

Solutions are bad practice especially if someone else ends up having to maintain but may be the best option with your theme.

"when i used wp_head, it ended up in the tag with all the JavaScript files."

If you mean within the body tag then there is a coding error in the theme. Otherwise it is "non-standard" design and could cause many plugins to "fail". Either wp_head(); is after the body tag or "wp_head" is used to insert <body> and maybe </head>.

If </head> is not in header.php or templates then adding the above "solutions" just above wp_head(); might still work but plugin issues will remain.

1
source | link

Since WP 4.7 the WP dashboard includes a CSS customizer (Appearence->Cusomize->Additional CSS). This might be a solution for your theme specific CSS as WP adds the style block to <head> after enqueued CSS and possibly other additions by theme.

Normal practice as per Cedons enqueing answer or jimihenrik's comment should work.

However; it appears this theme needs a "non-standard" solution (I like your JS solution) - alternatives include an edited copy of header.php in child theme.

"an internal stylesheet is added to the page's <head>"

The theme could be adding in a variety of ways in header.php e.g. hard coding; via a theme "action hook"; via wp-head

The last part of header.php typically contains:

<?php possibly_themes_own_action_hook(); ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
  Some HTML for header and navigation & other stuff prior to Loop adding say H1 title

If theme does not have header.php or it is missing </head> then relevant code is probably in templates.

In your child header.php just above </head> (if present - see below) you could either:

  • hard code your CSS above </head>
  • or <php include('path/to/mycss.css');?>

  • or add your own action:

     my_add_to_head(); 
    

    and in your functions.php

     function my_head_function() {
     ?>
     <style>.hero-description {border:1px solid #c00;}</style> 
     <?php
     // or file_get_contents to get css file and echo
     // + any other stuff you want to add to head
     }
     add_action('my_add_to_head', 'my_head_function');
    

Solutions are bad practice especially if someone else ends up having to maintain but may be the best option with your theme.

"when i used wp_head, it ended up in the tag with all the JavaScript files."

If you mean within the body tag then there is a coding error in the theme. Otherwise it is "non-standard" design and could cause many functions to fail. Either wp_head(); is after the body tag or "wp_head" is used to insert <body> and maybe </head>.

If </head> is not in header.php or templates then adding the above "solutions" just above wp_head(); might still work but plugin issues will remain.