[SOLVED] Trying to add ads in category pages
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 } ?> |
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.
|
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 |
that looks fine, but did you re-add it into index.php after the update?
|
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:
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 |
Attach the files
|
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 |
1 Attachment(s)
Oops apparently forgot to attach. Here it is. Thanks! MK
|
look at the line after this line in both
HTML Code:
<?php /* If there are any posts: */ |
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 |
All times are GMT -6. The time now is 01:53 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.