I am trying to add some css and js code to my home page editor at the wp-admin.
I am using simply
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.x-feature-box').each(function() {
var self = $(this),
icon_href = self.find('.x-feature-box-text a:last-child').attr('href');
if ( icon_href.length > 0) {
$(self).find('.x-feature-box-graphic-inner > *').wrap(function() {
return '<a href="' + icon_href + '" target="_parent"></a>';
});
}
});
});
</script>
<style id="cornerstone-custom-page-css" type="text/css">
.maps iframe{
pointer-events: none;
}
p.x-feature-box-text a{
font-size:1.5em !important;
color:white !important;
}
.x-text{color:rgb(250, 250, 250)}
</style>
at the top of the content in editor. Javascript is working but css is not working because this code is not called at the end of all css files instead it is loaded above the css files.
Also I want these code to be added at right place as we do with hooks. Means just above body tag.
And when I am adding this code it is coming in <p> tag which increasing space on my front end page.
I don't know how to do this but this is very critical for me.Please help.
functions.phpand add the code to thewp_headhook.