|
#1
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 04:28 AM
|
![NoisyDvL5's Avatar](image.php?u=10419&dateline=1276598872) |
|
|
27 posts · Jun 2010
Missouri
|
|
Hello,
Love the theme, but I've been tinkering and have perhaps altered something and caused an adsense that is placed in the loop to disappear.
I deleted the code and reinstalled it as
<?php if ( is_front_page() AND $bfa_ata['postcount'] == 3 ) { ?>
ADSENSE CODE HERE
<?php } ?>
But I haven't been able to get it to come back, so I'm guessing I've crossed streams somewhere.
Based on the dropoff in impressions, the image ad vanished yesterday. The only changes I made to the site in that time frame was some work on a custom template for related posts, editing the size of the page numbers that appear with the nextpage tag, and removing some of the padding on the page/post items to tighten up the front page.
All the changes were fairly simple (except for my inability to center the images on the related posts template), so I don't think they could've caused the ad to vanish, but I don't know what else would.
Thanks in advance for any help. This is my site if that can help solve this mystery...
http://www.itsalltrue.net
|
#2
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 04:32 AM
|
![juggledad's Avatar](image.php?u=675&dateline=1243595674) |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
What version of Atahualpa and WP?
where did you put that code?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 04:44 AM
|
![NoisyDvL5's Avatar](image.php?u=10419&dateline=1276598872) |
|
|
27 posts · Jun 2010
Missouri
|
|
I knew I'd leave something out.
Wordpress is 2.9.2 and Atahualpa is 3.4.9.
The code is placed in the Loop box on the Style/Edit Center Column as the given examples on that page suggest.
|
#4
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 08:10 AM
|
![juggledad's Avatar](image.php?u=675&dateline=1243595674) |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
please copy and past the entire contents of 'The LOOP' so I can see what you have. If there is something that is private, send it to me in a PM
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 11:46 AM
|
![NoisyDvL5's Avatar](image.php?u=10419&dateline=1276598872) |
|
|
27 posts · Jun 2010
Missouri
|
|
Thank you for your help/patience.
I'm not sure if I'm allowed to repost the Adsense code, but it's precisely copied from Google with no alterations. Here's the rest of the contents of the loop box:
Quote:
<?php /* For SINGLE post pages if activated at ATO -> Next/Previous Navigation: */ bfa_next_previous_post_links('Top'); ?> <?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 bfa_post_footer('<div class="post-footer">','</div>'); ?> </div><!-- / Post -->
<?php if ( is_front_page() AND $bfa_ata['postcount'] == 3 ) { ?>
<script type="text/javascript">ADSENSE
</script>
<?php } ?>
|
I've tried a simple test using the basic 'postcount' php to add a small snippet of text and I couldn't get it to appear on the front page either.
Could I have done something to violate the conditions, so that "third post" trigger never gets tripped?
The only formatting (mucking) I've done was to
-add some text formatting to page numbers in the "bfa_post_parts.php". I did remove some code from the pagination section so that the page numbers wouldn't appear on the main page, but I did that weeks ago.
-adapted a custom template for related posts and added some css inserts to govern it.
-changed the padding on the various post/page items
|
#6
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 12:07 PM
|
![juggledad's Avatar](image.php?u=675&dateline=1243595674) |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
it's got to be something else you did, or the adsence script.
I just stuck your code into The LOOP at my site, took out the <script...> and </script> and I see the word ADSENCE on the third post.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 01:15 PM
|
![NoisyDvL5's Avatar](image.php?u=10419&dateline=1276598872) |
|
|
27 posts · Jun 2010
Missouri
|
|
That's what I feared.
On my site, the word "ADSENSE" doesn't show up with the same test.
Again, thank you for your help and patience. I've run through the changes I made...
I can see no way that the simple changes to the padding could have caused this. All the syntax is correct.
Removing the nextpage page numbers from the main page I accomplished by editing bfa_post_parts.php :
This was probably ill advised, but I simply removed the if conditions on the pages where I didn't want the page numbers to show. I did this awhile back, so I don't believe it's related. Here's the code I left on that page:
Quote:
function bfa_post_pagination($before = '<p class="post-pagination"><strong>Pages:', $after = '</strong></p>') {
global $bfa_ata;
if ( (is_author() AND $bfa_ata['excerpts_author'] == "Full Posts") OR
is_single() OR is_page() ) {
wp_link_pages('before=<center><h3>'.$before.'&afte r=</h3></center>'.$after. '&next_or_number=number');
}
}
|
That leaves the YARPP plugin with custom template. The template and CSS inserts that govern it would appear to be unrelated, but I just tried deactivating the plugin and received this error message:
Quote:
Fatal error: Call to undefined function related_posts() in /home/itsallt/public_html/wp-content/themes/atahualpa/functions/bfa_postinfo.php(593) : eval()'d code on line 4
|
I assume this is refering to line 593 of that page. This is the snippet of code that contains line 593
Quote:
/* PHP code in Post Info Items.
But not for WPMU */
/*removed in 3.4.3. - PHP code works in WPMU too */
if ( strpos($postinfo_string,'<?php ') !== FALSE ) {
ob_start();
eval('?>'.$postinfo); <---593
$postinfo = ob_get_contents();
ob_end_clean();
}
|
Could this be related? Is this something that should be addressed with the YARPP author?
Last edited by NoisyDvL5; Jun 15, 2010 at 01:27 PM.
|
#8
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 01:47 PM
|
![juggledad's Avatar](image.php?u=675&dateline=1243595674) |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
my suggestion would be to get a fresh copy of bfa_post_parts.php. rename the current one and load up teh fresh cop to see if the code in The LOOP starts to run. If it does, you can start to play with bfa_post_parts.php again.
here is what I did to the LOOP code you provided
HTML Code:
<?php /* For SINGLE post pages if activated at ATO -> Next/Previous Navigation: */ bfa_next_previous_post_links('Top'); ?> <?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 bfa_post_footer('<div class="post-footer">','</div>'); ?> </div><!-- / Post -->
<?php if ( is_front_page() AND $bfa_ata['postcount'] == 3 ) { ?>
ADSENSE
<?php } ?>
this will just put the word 'ADSENSE' on the page
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#9
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 15, 2010, 06:14 PM
|
![NoisyDvL5's Avatar](image.php?u=10419&dateline=1276598872) |
|
|
27 posts · Jun 2010
Missouri
|
|
On your suggestion I pulled a fresh copy of bfa_post_parts.php from my blog and swapped it out with my edited version. The page numbers reappeared on my main page, but the loop didn't produce the ad after the third item with either version of the loop code.
I've posted on the support forums of the plugin author since this seems more and more to be on that end (unless I'm just on the wrong track). I'm somewhat dismayed that I can't deactivate the plugin because not having it turned on causes a fatal error with postinfo.php.
|
#10
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 16, 2010, 03:23 AM
|
![juggledad's Avatar](image.php?u=675&dateline=1243595674) |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
If you add code to an atahualpa module that calls a function in a plugin then deactivate thevplugin, the function will not be found and you can expect that type of error.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#11
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 16, 2010, 10:14 AM
|
![NoisyDvL5's Avatar](image.php?u=10419&dateline=1276598872) |
|
|
27 posts · Jun 2010
Missouri
|
|
You're dead on. I did a add a snippet of code into the footer for the plugin.
I swapped out the post parts, removed that code, and deactivated the plugin, basically undid all the changes I made to the site. The website loaded regularly, but the content was still missing from the loop.
I'm at a loss. Would upgrading to a newer version of the theme have a chance of fixing the problem?
|
#12
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 16, 2010, 01:34 PM
|
![juggledad's Avatar](image.php?u=675&dateline=1243595674) |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
nope, if you want to send me a PM with an admin ID and PW 'll take a look
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#13
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 17, 2010, 02:24 PM
|
![NoisyDvL5's Avatar](image.php?u=10419&dateline=1276598872) |
|
|
27 posts · Jun 2010
Missouri
|
|
I'll have to check and make sure that's okay with the bossman, but it shouldn't be a problem.
Thanks for the help!
|
#14
![Old](images/bytesforall/statusicon/post_old.gif)
Jun 26, 2010, 01:36 AM
|
![NoisyDvL5's Avatar](image.php?u=10419&dateline=1276598872) |
|
|
27 posts · Jun 2010
Missouri
|
|
Sorry that it took me so long to come back!
Apparently, all the work I was doing to fix the ad I lost was for nothing! When I explained everything, the webmaster said she wanted to get rid of it and wanted me to take the opportunity to go to a two column format.
Thank you again for your help!
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
half of blog vanished after upgrade install
|
Monkey_Fist |
New Versions, & Updating |
6 |
Jan 15, 2014 05:53 PM |
Site has vanished after upgrade
|
tcleveland |
New Versions, & Updating |
4 |
May 7, 2010 08:24 AM |
All my Google Analytics stats vanished
|
Flynn |
Atahualpa 3 Wordpress theme |
5 |
Nov 18, 2009 04:23 PM |
Trying to modify the loop
|
sspeedy |
Post-Kicker, -Byline & -Footer |
5 |
Aug 27, 2009 06:38 PM |
Only Pages in the loop
|
sumochill |
Excerpts, Read more, Pagination |
1 |
Aug 13, 2009 09:52 AM |
|