Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

[SOLVED] Please help: Where to add Php code now...


  #1  
Old Feb 24, 2012, 02:04 PM
JaneD
 
72 posts · Jan 2009
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
  #2  
Old Feb 24, 2012, 04:04 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
I'd tr putting it in index.php in the loop section
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Feb 26, 2012, 05:04 PM
JaneD
 
72 posts · Jan 2009
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...
  #4  
Old Feb 26, 2012, 05:24 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Feb 26, 2012, 09:26 PM
JaneD
 
72 posts · Jan 2009
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. :-(
  #6  
Old Feb 26, 2012, 09:33 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Last edited by lmilesw; Feb 26, 2012 at 09:42 PM.
  #7  
Old Feb 27, 2012, 05:25 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
edit index.php and put it in the loop area.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Feb 27, 2012, 09:40 AM
JaneD
 
72 posts · Jan 2009
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.
  #9  
Old Feb 27, 2012, 10:08 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] copy/pasting jquery code in page apparently generates unwanted code tags (p, mafgirl Center area post/pages 2 Jan 19, 2012 10:10 AM
php code not run OlliM1810 Center area post/pages 1 May 18, 2011 11:09 AM
Adding code for ads or other sites (newbie when it comes to code issues!) gardentravelbuzz Plugins & Atahualpa 7 Feb 7, 2011 05:43 AM
Where should this code be placed atticadesign Forum How-To 3 Jun 7, 2010 05:42 AM


All times are GMT -6. The time now is 11:56 AM.


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