Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Plugins & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=16)
-   -   adsense plugins dont seem to work (http://forum.bytesforall.com/showthread.php?t=1559)

ronald73 May 6, 2009 03:52 AM

adsense plugins dont seem to work
 
I've installed and tried a few of the wp adsense plugins to have them automatically insert an adsense-ad at the bottom of each post. When I activate them, they work on the pages, but not in posts. I've tried them on other sites and themes and there they do work, so I guess it must have something to do with Atahualpa.

Can anyone explain how I can get those plugins to work with atahualpa and posts?

Flynn May 7, 2009 12:42 AM

Use the newest theme version, and let me know which plugin

Also here's how to add Adsense to all posts with a function in functions.php instead of a plugin http://forum.bytesforall.com/showthread.php?t=431

wizonesolutions Sep 23, 2009 05:30 PM

Hi Flynn,

I figured I might as well add to this thread since I'm having the same issue - though just partially.

I'm using Advertising Manager, the successor to AdSense Manager. Here's the ticket I filed: http://code.openx.org/issues/show/46

It includes the Atahualpa-relevant stuff too, and I'm using the latest version (3.4.1). Also note that this plugin provides widgets, and I am able to successfully use one of those in my left-hand column.

My blog address is http://www.wizonesolutions.com/blang.

I know that your time is tight, so if you could just advise me on where I should check (I can even get down and run it through Xdebug if I know roughly where to set the breakpoints) that would be great.

Thanks,
Kevin

wizonesolutions Sep 30, 2009 11:33 AM

I have additional information on this.

My code actually does work on single page posts if I click through, but on the posts page, it won't show. Is THE LOOP restricted automatically to single-page posts? Talking about the ATO of course.

I have this in "Style and edit CENTER COLUMN" -> The LOOP:

<?php /* Post Container starts here */
if ( function_exists('post_class') ) { ?>
<div <?php if ( is_page() ) { post_class('post'); } else { post_class("$odd_or_even"); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>
<div class="<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post" id="post-'; the_ID(); ?>">
<?php } ?>

<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>

<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>

<?php bfa_post_byline('<div class="post-byline">','</div>'); ?>

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>

<?php bfa_post_pagination('<p class="post-pagination"><strong>'.__('Pages:','atahualpa').'</strong>','</p>'); ?>

<?php echo advman_ad('header-ads'); ?>

<?php bfa_post_footer('<div class="post-footer">','</div>'); ?>

</div><!-- / Post -->

juggledad Sep 30, 2009 01:05 PM

What version of Atahualpa, WP and PHP?
What is the url?

Wimbledon Oct 4, 2009 09:02 PM

Adding Adsense to the bottom of posts can be done in a VERY simple way.

Use the Add Post Footer plugin to add code to the bottom of your posts. You can then put in whatever you want, whether it's Adsense code or any other type of ad. Done.

I have this on several sites with Atahualpa, and it works perfectly.

wizonesolutions Oct 26, 2009 12:30 AM

Thanks Wimbledon. It kinda works, but still doesn't seem to support Advertising Manager. It also leaves ugly white space (where AdSense fortunately restricts itself to 3 ads per page...) at the bottom of some of my posts on the index.

juggledad, in case you still wanted to take a look, it's Atahualpa 3.4.1, PHP 5.2.9, WordPress 2.8.5. URL: http://www.blangblog.com. I've still got the code calling the function to display the ads in my "THE LOOP" code...

It's worth noting that ads DO show in single-post mode, but when multiple posts are shown, the ads aren't.

Thanks,
Kevin

juggledad Oct 26, 2009 08:45 AM

the code is running on add executions of 'The LOOP' (btw, you don't need the 'echo', but to prove it is running, change the "echo" to "echo 'before call to advman_ad<br>';" and you should see that echo'e before each post footer.

You will have to look into the advman_ad code to find out why it won't display in a multi post page. It might be a setting??

wizonesolutions Oct 29, 2009 01:43 AM

Thanks juggledad. I'll run the plugin through a debugging session most likely ... at some point :)

For now I've got the ads on single page posts at least, so I'll manage I guess.

Yeah, I did the echo test myself before, and that's why it was so weird. What is different about the way the Atahualpa loop may handle the code returned by the function vs. your average widget? I'm guessing that since it's different parts, there are of course differences. Just trying to imagine what could be the deal. I guess Atahualpa would have to run an eval() on my PHP code vs. widgets, where I can use shortcodes. Does Atahualpa's Loop support WordPress shortcodes? Cuz that's an option with this plugin too.

Thanks again.
Kevin

fencepost Nov 3, 2009 08:02 AM

I'm wondering if there's a conflict between some piece of javascript that's not always loaded by Atahualpa and AdSense, because I'm seeing oddness as well. In particular, the Adsense code is present in the HTML, but nothing shows up on posts, where it is showing on the main page.
Right now it's pasted into a text widget instead of the Advertisement one. Site is http://www.fencepost.net, WP 2.8.5, Ata 3.4.4, current Advertising Manager plugin.


All times are GMT -6. The time now is 10:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.