Tagged: inline css
Do I modify header.php ?
where do I put the in-line CSS ? For instance directly after wp_head:() ? Or other code….
Please advise, thanks
!– Scripts/CSS and wp_head hook –>
<?php
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
</head>
Hi Ed!
Please go to our theme Options Page, and place the Custom CSS you need, from there! No need to modify any theme file!
Best regards,
Basilis
Hi,
I am well aware of the option page for custom Css.
However, I need to “inline CSS” and the custom CSS is not the answer.
Please advise as to where I would inline CSS.
thanks
Hey!
Please add following code to Functions.php file in Appearance > Editor
function add_custom_code(){
?>
//YOUR CODE HERE
<?php
}
add_action('wp_head', 'add_custom_code');
Please do not forget to wrap your code with STYLE tag
Regards,
Yigit
Thanks !, could I also inline .js using the code you gave me ?