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, 01:04 PM
JaneD
 
72 posts · Jan 2009
[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
  #2  
Old Feb 24, 2012, 03: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, 04: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, 04: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, 08: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, 08: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 08:42 PM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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 09:10 AM
php code not run OlliM1810 Center area post/pages 1 May 18, 2011 10:09 AM
Adding code for ads or other sites (newbie when it comes to code issues!) gardentravelbuzz Plugins & Atahualpa 7 Feb 7, 2011 04:43 AM
Where should this code be placed atticadesign Forum How-To 3 Jun 7, 2010 04:42 AM


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


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