Jump to content


Photo
- - - - -

Adsense Mobile Ad Unit

Adsense Ad Unit Mobile Ad Mobile Ad Unit New Adsense Mobile Ad

Best Answer cfimortgage , 10 April 2013 - 08:23 PM

Hi,

 

First, I'd recommend you install the Action Map plugin, which is free.  This will help you to identify the proper hook to use.

 

Next, I strongly recommend the PageLines Customize plugin, which like Action Map, is free, and found in our Store.

 

Following this, I suggest the Hooker plugin. 

 

After finding the right hook, you can select that with the Hooker Plugin, then paste the actual php you want to implement and save the hook.  The complete process will be shortened and made much easier for you.

 

I'm not sure how you're implementing this Google Code for mobiles. I've not tried that, so it's a bit out of my realm at present.

 

I have everything but that hooker plugin but I have added the code to a function and added that function with an add_action to the hook I wanted but that didnt work. It caused errors in googles script. On the other hand I simply placed it into the functions.php page so it would run on load and then I was able to create a css work around for my desired result. It uses a wildcard ID search because google changes the ID of the control each time the page loads.

 
[id^='google_afmc_']
{
position: fixed;
bottom: 0;
z-index: 1000;
}
Go to the full post


  • Please log in to reply
5 replies to this topic

#1 cfimortgage

cfimortgage

    Advanced Member

  • Members
  • 56 posts
  • Country: Country Flag

Posted 10 April 2013 - 02:31 PM

I am working to make my site work better with mobile browsers and I also wanted to place a floating ad along the bottom like I see on many sites. It would appear that Google changed their ad unit from a normal ad the site of a mobile screen to a completely different ad modem that is very code driven. They give you the option of either PHP or JSP but it isnt the easy to edit code they used. Plus instead of having the control of being able to place it somewhere on your page it seems to place it right at the top and I cant figure out a way around that.

I placed the PHP code directly into the functions page and it just worked but again with no control by me. I would like to use a hook or something to better control its position. I tried CSS but the control holding the iframe has a randomly generated name so I cant really apply CSS to it. When I attempt to put Either the PHP or the JSP into a function to call as an "add_action" it gives me errors. Could anyone give me some idea of how to add this where I might have a little more control of its location or the best way to add it to pagelines customize.

This is the PHP version:

Please Login or Register to see this Hidden Content

This is the JSP version:

Please Login or Register to see this Hidden Content



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 10 April 2013 - 08:15 PM

Hi,

 

First, I'd recommend you install the Action Map plugin, which is free.  This will help you to identify the proper hook to use.

 

Next, I strongly recommend the PageLines Customize plugin, which like Action Map, is free, and found in our Store.

 

Following this, I suggest the Hooker plugin. 

 

After finding the right hook, you can select that with the Hooker Plugin, then paste the actual php you want to implement and save the hook.  The complete process will be shortened and made much easier for you.

 

I'm not sure how you're implementing this Google Code for mobiles. I've not tried that, so it's a bit out of my realm at present.



#3 cfimortgage

cfimortgage

    Advanced Member

  • Members
  • 56 posts
  • Country: Country Flag

Posted 10 April 2013 - 08:23 PM   Best Answer

Hi,

 

First, I'd recommend you install the Action Map plugin, which is free.  This will help you to identify the proper hook to use.

 

Next, I strongly recommend the PageLines Customize plugin, which like Action Map, is free, and found in our Store.

 

Following this, I suggest the Hooker plugin. 

 

After finding the right hook, you can select that with the Hooker Plugin, then paste the actual php you want to implement and save the hook.  The complete process will be shortened and made much easier for you.

 

I'm not sure how you're implementing this Google Code for mobiles. I've not tried that, so it's a bit out of my realm at present.

 

I have everything but that hooker plugin but I have added the code to a function and added that function with an add_action to the hook I wanted but that didnt work. It caused errors in googles script. On the other hand I simply placed it into the functions.php page so it would run on load and then I was able to create a css work around for my desired result. It uses a wildcard ID search because google changes the ID of the control each time the page loads.

Please Login or Register to see this Hidden Content



#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 10 April 2013 - 08:39 PM

So this issue is resolved?



#5 cfimortgage

cfimortgage

    Advanced Member

  • Members
  • 56 posts
  • Country: Country Flag

Posted 10 April 2013 - 09:00 PM

So this issue is resolved?

Yes but I would love someone who is much better at pagelines to take a look at googles new adsense mobile ad unit and fiddle around with it on pagelines so we might have a better understanding of how best to insert is and move it around on the site besides my fix. I just feel I cant be the only one that is going to have questions about this.



#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 14 April 2013 - 02:20 PM

I've checked the code on Google, and will be testing over the next few days.  As soon as I have something to report, I'll send you a message or post it here. Sorry for the time it's taking. Not all the moderators use Google AdSense on their sites.







Also tagged with one or more of these keywords: Adsense, Ad Unit, Mobile Ad, Mobile Ad Unit, New Adsense Mobile Ad