Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
You may need to read up on Child Themes: http://codex.wordpress.org/Child_Themes as you shouldn’t be editing the theme’s files like that.
Hi,
Try to enter your ad to the “Header Right” widget area using “Text” widget.
I did try that Artur. When I insert the ad code there it appears below the logo/site text but within the header. I want the ad to appear after header and before the start of the breadcrumb.
This is how it appears when I use that widget – http://i.imgur.com/kprv4Z7.png
I want it to appear before that ‘Home’ box on top. Hope I have explained it clearly.
Try the code below, you can add it to functions.php or use this plugin: http://wordpress.org/plugins/pluginception/ to create new plugin with this code.
function my_test_ad() {
echo '<div class="span12" style="text-align: center;">test ad</div>';
}
add_action('wwl_before_content', 'my_test_ad');
I am not really code savvy, what will this code do?
It will print code in the exact place you want. Just change “test ad” inside the div to your adsense code.
Try it, I’ve written and tested it. It’s safe.
Fantastic!! It worked Artur. Just one issue, I need a link break after the add since the add and Home breadcrumb are looking like they are joined – http://i.imgur.com/eUT6gzq.png
Just add to this div margin:
<div class="span12" style="text-align: center; margin-bottom: 20px;">