Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

[SOLVED] Trying to add ads in category pages


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Jan 25, 2013, 10:15 AM
mkellam
 
60 posts · Jan 2011
Hi,
In the past, I asked how to place ads after the 3rd and 6th post on category pages. The following code has worked great but when I updated to 3.7.10, I noticed the ads are gone. It turns out they've been gone since i upgraded from 3.7.3. I think this means one of the variables has cvhanged in the newer versions. Can you please tell me what changes I need to make th this code to make it work on the current version? Thanks! Michael


<?php if ( is_category() AND (($bfa_ata['postcount'] == 3 ) OR ($bfa_ata['postcount'] == 6 )) ) { ?>

[Ad Code Goes Here]

<?php } ?>
  #2  
Old Jan 25, 2013, 01:44 PM
juggledad's Avatar
juggledad
 
22,245 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
because of wordpress requirements, php in the theme options is no longer allowed. You will have to edit the index.php and put that code in it.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Jan 25, 2013 at 08:24 PM.
  #3  
Old Jan 25, 2013, 01:59 PM
mkellam
 
60 posts · Jan 2011
Hi Juggledad,

Thanks for your answer. I have not been using it in the theme options the last several versions, so I have been hard coding it into the index file, but even though it worked hard coded in a previous version, it's not working anymore.

Does it look like I'm calling for something that's been deprecated or does it look like it should work this way? I assumed that one of the functions had changed.

Thanks very much!

Michael
  #4  
Old Jan 25, 2013, 04:23 PM
juggledad's Avatar
juggledad
 
22,245 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
that looks fine, but did you re-add it into index.php after the update?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Jan 25, 2013, 05:09 PM
mkellam
 
60 posts · Jan 2011
Yes, I added it to the index. I have several other ads included in different places in the index and they're showing up fine.

I switched back to my Atahualpa 3.7.3 and the ads showed up again with no problem.

When I compared the index files for the 3.7.3 and the 3.7.10, that PHP and ad coding appears to be exactly the same and located in the same place in the index file, so I'm not sure why it would show up in one version of the theme and not in the other.


I just did a few more tests:
  • I placed the ad code directly in the index.php without the php is_category protocol and the ad showed up fine.
  • Then I re-added the php is_category protocol and replaced the ad with the word "test" but the word test did not show up on the page.
  • Then I tried the word "test" with the postcount=3 and removed the OR postcount=6 and the word test still did not show up on the page.


To me, this suggests that something is wrong with the PHP statement except that the same statement worked fine with Atahualpa 3.7.3.

Could it be the placement in the index file? It's the same place where I had it in the 3.7.3 index but other things have changed in that file.


If none of this rings a bell, can I send you both index files so you can see if I've missed something?

Thanks again!

Michael
  #6  
Old Jan 25, 2013, 08:25 PM
juggledad's Avatar
juggledad
 
22,245 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
Attach the files
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #7  
Old Jan 29, 2013, 01:49 PM
mkellam
 
60 posts · Jan 2011
Hi Juggledad,

Here they are. Sorry for the delay. We were down with the flu.

Again, the problem is only with the ads after the 3rd and 6th posts on the category pages. All other ads are fine.

Thanks for checking!

Michael
  #8  
Old Jan 29, 2013, 01:50 PM
mkellam
 
60 posts · Jan 2011
Oops apparently forgot to attach. Here it is. Thanks! MK
Attached Files
File Type: zip index-files-troubleshooting.zip (5.3 KB, 135 views)
  #9  
Old Jan 29, 2013, 04:24 PM
juggledad's Avatar
juggledad
 
22,245 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
look at the line after this line in both
HTML Code:
<?php /* If there are any posts: */
then look at your code.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #10  
Old Jan 30, 2013, 11:59 AM
mkellam
 
60 posts · Jan 2011
Thanks, Juggledad! I thought something might have changed - That variable changed but I never changed it in my changelog and kept updating it incorrectly. Thanks for looking!

Michael

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Styling the category pages guaccio2209 Atahualpa 3 Wordpress theme 6 Oct 30, 2011 07:51 AM
How to Set Meta Title for Category Pages New WordPress Fan Forum How-To 1 Oct 27, 2011 06:10 PM
[SOLVED] How to: display category name on category pages wittyusername Center area post/pages 3 Feb 25, 2011 06:25 AM
Images in my category and archive pages? middlemountain Atahualpa 3 Wordpress theme 1 Apr 11, 2009 10:28 PM
How to place ads at top of category pages? RuthSmith Atahualpa 3 Wordpress theme 3 Feb 25, 2009 12:49 PM


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


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