Community Forums › Forums › Archived Forums › Design Tips and Tricks › Place AdSense Code after Specific Paragraph [Not Working]
- This topic has 4 replies, 3 voices, and was last updated 9 years, 6 months ago by Borange.
September 11, 2013 at 3:43 pm #62014jmrallenMember
There's a great post here by Brad Dalton about how to place some code in your functions.php file to get Adsense code to appear after a specific paragraph. I've managed to get the Adsense area to display correctly, but the ad itself isn't displaying; it just shows blank. In the area for
$new_content .= 'Paste Adsense Code Here';
I adjusted the width of the div to accommodate a 300x250 ad plus padding. I can adjust that setting accordingly and see the results on the spacing of the text, but again, the ad itself is just showing blank.September 12, 2013 at 12:10 am #62060Brad DaltonParticipant
Sometimes Google takes time to approve add placement but that may not be the reason if you've already waited.
Or you could try to register the script and put it in a js folder then use the handle in the code above using wp_enqueue_script.
Another option is to use the code to create a new widget area and use an Adsense plugin to display the code.
September 13, 2013 at 12:54 pm #62323jmrallenMember
Will this ad placement penalize you having an ad in the content?
I was wondering if you can do a wrap around ad in content sot he text wraps around the ad?December 5, 2013 at 4:40 pm #77296BorangeMember
I added this to my site but it looks odd, is there anyway to make the TEXT in the article wrap around the adsense block?
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.