AdSense Secondary Domain

Friday, October 20, 2017

Happy Caturday from Stalone

Sunday, October 1, 2017

Beautiful Sunset

Sunset in this part of the world are just gorgeous...

Thursday, September 14, 2017

How to add amp-auto-ads code to Wordpress site which uses "AMP for WP"

I've installed "AMP for WP" after Google started punishing it in search results for not having Accelerated Mobile Pages some time ago. And have been playing with it for some times now. The plugin itself is very nice and gives an easy way to set up pages and customize them a bit.

However there doesn't seem to be an easy way to add custom code to the page content itself. There is a way to add code between "<head></head>" tags or to the footer, but there is no such way to do it within "<body></body>" tags. And this is where customized Adsense codes should go if you wish to use some (including responsive ads by the way).

I did get away with using standard plugin way of adding adsense (non-responsive) for a while. However I had to figure alternative way of dealing with this problem today since I've got an invitation to "Accelerated Mobile Pages (AMP) Auto Ads" google labs for my cooking website, enabling of which requires to add some custom code to the AMP page content right after the "<body>" tag.

After few tries to search through forums, FAQs, and websites, this is the solution which I came up with (use it on your own risk, plugin documentation didn't have this hook listed and I had to do some code reviews to find it, so it may not work entirely the way I think, or may stop working in future).

I've hooked into 'ampforwp_body_beginning' (added the following to the functions.php of my theme, replace angled brackets with proper characters and appropriate code in the adsense ca-pub value should you choose to copy/paste the code):

function amp_ads_insert() { echo '<amp-auto-ads data-ad-client="ca-pub-YOUR-CODE-HERE" type="adsense"></amp-auto-ads>'; }
add_action( 'ampforwp_body_beginning', 'amp_ads_insert', 0);

Wednesday, April 12, 2017

New California Dr

Just a pic snapped on a walk around the neighborhood:

Saturday, April 8, 2017

Spring vs Winter

Between warm and cold, sun and snow, they survived somehow...

Thursday, March 23, 2017

Fuurday, sleepy day

Cats literally can sleep any where in whatever pose they like... And he for sure looks comfortable:

Sunday, March 12, 2017

Spring is Coming

With weather jumping back and forward between 65F and 30F for weeks now, these guys decided it is time for Spring to come... I am not blaming them:

Wednesday, March 8, 2017

Stalone and Painter

Stalone: "Moooom, Painter has almost finished his plate, can we get a dessert now?"

Monday, February 27, 2017

Stalone on the Table

One more nail into discussion on whatever we let our cats to be on a table...

Saturday, February 4, 2017

Friday, February 3, 2017

Shiva-Ouroboros

Nothing special, just a photo of Shiva (aka Ouroboros) being Shiva on a Friday night:

Saturday, January 7, 2017

Shiva Being Shiva

Shiva just looks serious, in reality she is white and fluffy:

Thursday, January 5, 2017

Cozy Stalone

Just two pictures of Stalone being cozy in the bed...

Sunday, January 1, 2017

Meet Cubic

He is visiting us for some time, but I somehow never introduced him here:

He is wishing everybody Happy Holidays and Happy New Year!