Author Topic: Option for injecting ads  (Read 15352 times)

empty

  • Newbie
  • *
  • Posts: 4
Option for injecting ads
« on: May 21, 2015, 11:58:55 AM »
Hi.

Just bought the theme and it works fine.

Only one wish: Please add an option, to insert ads (under the header and/or at the bottom) in a simple way, so i don't have to patch the theme files.

Hope, you'll think about it.

Regards,

Mario

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 454
Re: Option for injecting ads
« Reply #1 on: May 21, 2015, 12:29:57 PM »
Thanks for your suggestion, I'll indeed add an option, it should be quite easy :)

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 454
Re: Option for injecting ads
« Reply #2 on: May 22, 2015, 12:24:51 PM »
Added for next release, you can now add ads below the header and above the footer right from your Theme Settings :)

empty

  • Newbie
  • *
  • Posts: 4
Re: Option for injecting ads
« Reply #3 on: May 22, 2015, 01:52:17 PM »
Wow!

Thanks a lot. Will try it out tomorrow!


Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 454
Re: Option for injecting ads
« Reply #4 on: May 22, 2015, 03:56:12 PM »
Let me know how it goes :)

empty

  • Newbie
  • *
  • Posts: 4
Re: Option for injecting ads
« Reply #5 on: May 23, 2015, 02:45:49 AM »
The injection works fine.

But with adsense, there seems to be a problem with responsive ads.

If i choose the recommended responsive layout, no ad shows up. if i choose a fixed size (e.g. 320x100) the ad is displayed.

Don't know, if this is a problem caused by the theme (css?) or by Google...

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 454
Re: Option for injecting ads
« Reply #6 on: May 23, 2015, 11:38:12 AM »
For jQuery Mobile you need to replace:

Code: [Select]
(adsbygoogle = window.adsbygoogle || []).push({});
With:

Code: [Select]
var prev_handler = window.onload;
window.onload = function () {
    if (prev_handler) {
        prev_handler();
    }
    (adsbygoogle = window.adsbygoogle || []).push({});
};

In the code Google gave you.

scrapfighter

  • Newbie
  • *
  • Posts: 5
Re: Option for injecting ads
« Reply #7 on: May 23, 2015, 04:35:29 PM »
yes it could be super cool .. also if it was possible to have own ads and not only google ads :)
cheers from Denmark and thanks for your great work  :D ;D

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 454
Re: Option for injecting ads
« Reply #8 on: May 24, 2015, 12:54:46 AM »
In theme settings you can add any HTML code you want, including your own ads :)

empty

  • Newbie
  • *
  • Posts: 4
Re: Option for injecting ads
« Reply #9 on: May 24, 2015, 08:57:36 AM »
Thanks for your superb support!

Administrator

  • Administrator
  • Sr. Member
  • *****
  • Posts: 454
Re: Option for injecting ads
« Reply #10 on: May 24, 2015, 09:42:54 AM »
Thanks to you for your suggestion :)