Marketing & Sales Videos

Google Adsense for Search: Embed Results in WordPress

Google AdsenseWhile I did quite a bit of template work on WordPress this weekend, I saw a note about embedding your Google Adsense for Search results within your Search Results page. This is pretty simple if you have a static website, but working within WordPress it’s a little more difficult. Thankfully, Google did a nice job (as usual) with writing some nice clean scripts to embed the results.

I simply edited my “Page” template and inserted the code that Google requires for the landing page. I have the search results posting to my search page (https://martech.zone/search). Then, I updated my Search page with the search form (with some minor edits of course).

The script that Google supplies is intelligent to only display if there is a post result, so my other pages do not display anything. I suppose I could have wrote an ‘if statement’ that only displayed the results if the page equals the search page. However, I didn’t bother since it won’t display otherwise. I suppose it’s a little bit of a hack and not proper, but it doesn’t hurt anything.

My next step was to ensure that no competitors to my employer showed up on the search results! I hope I got them all!

Try it out here.

Douglas Karr

Douglas Karr is a fractional Chief Marketing Officer specializing in SaaS and AI companies, where he helps scale marketing operations, drive demand generation, and implement AI-powered strategies. He is the founder and publisher of Martech Zone, a leading publication in marketing technology, and a trusted advisor to startups and enterprises… More »
Back to top button
Close

Adblock Detected

We rely on ads and sponsorships to keep Martech Zone free. Please consider disabling your ad blocker—or support us with an affordable, ad-free annual membership ($10 US):

Sign Up For An Annual Membership