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)
-   -   [SOLVED] Please help: Where to add Php code now... (http://forum.bytesforall.com/showthread.php?t=16844)

JaneD Feb 24, 2012 01:04 PM

[SOLVED] Please help: Where to add Php code now...
 
I am setting up a new site using a new plugin (WP-ADA) and I am supposed to:
Place <?php if(function_exists('ada_pet')) { ada_pet(); } ?> in your templates wherever the single post, archive etc context is used. Best place is below the_title(), but you can place it anywhere within the loop.
I am not sure where exactly I'm supposed to be putting this. Since it's PHP I know I can't do it through the Ata Options anymore (if I ever could have) but there are so many files in the editor, I'm not sure which one is the correct one.

Could someone point me in the right direction.

I'm using WordPress 3.3.1 & Atahualpa 3.7.3

juggledad Feb 24, 2012 03:04 PM

I'd tr putting it in index.php in the loop section

JaneD Feb 26, 2012 04:04 PM

Thanks for trying to help Juggledad. I added the line in there and it didn't break my site, but it doesn't appear to be doing anything either.

I switched over to the Twenty-ten theme and followed their directions to make the change on it and it worked.

Quote:

This code will get the pet thumbnail and special info. Bellow, where to insert the code in default Twenty Ten theme:
loop-single.php Line:33
loop.php Line:139
However I see no "loop-single.php" in my files under Atahalupa. I even tried copying that (working in twenty-ten) file from the twenty-ten folder & placing it in in the Atahalupa template folder, but no change.

Obviously something is not getting called properly, but I have no idea what's missing? I noticed that in Twenty-ten the new line of PHP goes right before this line: <?php the_content(); ?> but I can't find that line in any of the Ata files...

juggledad Feb 26, 2012 04:24 PM

after you add the code to the Atahualpa footer content - view the fornt page of your site and then go to the dashboard->appearances->widgets and you should see your new areas

JaneD Feb 26, 2012 08:26 PM

Juggledad, I'm not trying to add new widgets - I know how to do that. :-) The code I'm trying to add, pulls in additional info from the plugin... You can't see this special info on single post pages UNLESS the code is inserted & working properly. And I can't figure out how to do that in this theme. :-(

lmilesw Feb 26, 2012 08:33 PM

You could add a new widget area in the byline of the posts and then use a php aware text widget to add the code.

juggledad Feb 27, 2012 04:25 AM

edit index.php and put it in the loop area.

JaneD Feb 27, 2012 08:40 AM

Thank you for the suggestion Lmiles - but that seems like alot of work for something as simple as this should be. As I said, I was able to make it work using the Twenty-ten theme simply by adding that one line of code to a template file, but can't get it to work in Ata.

Juggledad, I already did do that, I put it right before the end of the loop.

OK - I went back & moved it to the beginning of the loop & NOW it's working. I still have to figure out how to adjust/style all this new info but at least it's in there. Thanks so much for the help and suggestions.

lmilesw Feb 27, 2012 09:08 AM

I have a many sites to maintain so like to make modifications that won't require redoing if I upgrade the theme therefor I don't like to edit theme files if I can avoid it. If you only have one site this is not such a big deal.


All times are GMT -6. The time now is 03:08 AM.

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