Topic: Inserting Ad on Home Page

Hello,

I am curious to see how to insert a Google Adsense ad on the home page in between the 2nd and 3rd post.  I have two on the right sidebar, but I would also like one that will hit readers as they scroll between homepage posts.

I've looked all over for plugins for this specific application, but haven't found any that work.  So I'm assuming I wold need to code it.  Anyone have any idea how to do this?  Here's my website: www.brianekoenig.com

Thank you so much,

Brian

Thumbs up

Re: Inserting Ad on Home Page

What plugin do you use for your like and tweet buttons?

Arras Theme For the Win!

Re: Inserting Ad on Home Page

It's called "Twitter Facebook Social Share."  Works pretty well.

Thumbs up

Re: Inserting Ad on Home Page

Bump.  Anyone every figure this out?  I've looked everywhere.

Thumbs up

Re: Inserting Ad on Home Page

I looked at your site and I don't see the adsense ads anywhere but I am assuming that the one in your sidebar are put there by some widget that the adsense plugin provides?

In order to insert an ad in the main body of the page, you'll have to do some coding and add that section to the home.php page. However, before you do that, find out whether you plugin provides and API that you can use to insert ads manually. If there isn't a function that you can call then you might be out of luck.

Second, you'll have to decide where you want the ad to appear. Depending on the location, you the change might be simple (just adding a <div> section in home.php) or complicated (trying to figure out exactly how to add and ad in the middle of The Loop).

Thumbs up

Re: Inserting Ad on Home Page

voidtrance wrote:

I looked at your site and I don't see the adsense ads anywhere but I am assuming that the one in your sidebar are put there by some widget that the adsense plugin provides?

In order to insert an ad in the main body of the page, you'll have to do some coding and add that section to the home.php page. However, before you do that, find out whether you plugin provides and API that you can use to insert ads manually. If there isn't a function that you can call then you might be out of luck.

Second, you'll have to decide where you want the ad to appear. Depending on the location, you the change might be simple (just adding a <div> section in home.php) or complicated (trying to figure out exactly how to add and ad in the middle of The Loop).

Yeah, I used a plugin to insert the ads that I have on the sidebar and top of the page.  I also was able to get them inserted at the bottom of individual posts, but only if you click on an individual post.

What I'm trying to do is put an ad on the home page in between the second and third post. I found a bunch of sites that explain the coding, but I've been looking through the home.php and am not seeing similar code.  I guess Arras has different coding.  For example, this is one of the sites I found (they all say pretty much the same thing).

http://www.lancelhoff.com/adding-adsens … een-posts/

Thumbs up

Re: Inserting Ad on Home Page

briankoe wrote:
voidtrance wrote:

I looked at your site and I don't see the adsense ads anywhere but I am assuming that the one in your sidebar are put there by some widget that the adsense plugin provides?

In order to insert an ad in the main body of the page, you'll have to do some coding and add that section to the home.php page. However, before you do that, find out whether you plugin provides and API that you can use to insert ads manually. If there isn't a function that you can call then you might be out of luck.

Second, you'll have to decide where you want the ad to appear. Depending on the location, you the change might be simple (just adding a <div> section in home.php) or complicated (trying to figure out exactly how to add and ad in the middle of The Loop).

Yeah, I used a plugin to insert the ads that I have on the sidebar and top of the page.  I also was able to get them inserted at the bottom of individual posts, but only if you click on an individual post.

What I'm trying to do is put an ad on the home page in between the second and third post. I found a bunch of sites that explain the coding, but I've been looking through the home.php and am not seeing similar code.  I guess Arras has different coding.  For example, this is one of the sites I found (they all say pretty much the same thing).

http://www.lancelhoff.com/adding-adsens … een-posts/

So, I guess you want to insert the ad in the middle of The Loop. As I mentioned this can get a bit more complicated. I am not sure how comfortable you are with PHP and digging and changing code but most likely you'll have to get your hand "dirty".

I would start by looking at "arras_get_tapestry_callback()" in library/tapestries.php. That is where the loop which loops through the posts is. However, to make things portable and re-usable the author(s) have chosen to use callback for rendering the actual HTML. What this means is that the same code in arras_get_tapestry_callback() is used for any type of view through out the theme. You'll have to figure out how to limit the ad code to the home page and to the type of view that you want.

Thumbs up

Re: Inserting Ad on Home Page

Ok, yeah I've been getting more comfortable with it as I struggle through this.  I've been to countles websites and following all their steps to changing the code on the home page, but all I'm able to do is get the ad right below the slideshow and right below the last post on the homepage.  Just can't get the ad in between any of the posts.

Any idea if the developer has an email posted somewhere here?

Thanks for the help.

Thumbs up

Re: Inserting Ad on Home Page

Does anybody know his or her email?  If I can't figure this out, I'm going to have to switch to another theme.  Which would be unfortunate, because I love it.

Thumbs up