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 »

Where to put php template tags?


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 Feb 5, 2013, 01:44 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Hi. I just started using a plugin that allows me to assign a unique image to each of my categories, and then use a template tag to display that image within a post (anywhere inside the loop). I want to display it in the kicker or byline area, but we're not allowed to put php in the theme options. Here's the tag I want to use:

<?php c2c_the_category_image(); ?>

Where should I put this to make the image appear in the kicker or byline area?

Thanks!
__________________
Emanuel
http://www.sferios.com
  #2  
Old Feb 5, 2013, 02:40 PM
lmilesw's Avatar
lmilesw
 
10,097 posts · Jul 2009
Central New York State USA
You could put the code for a new widget area in the kicker box and then add your code using a php aware widget.
__________________
~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.
  #3  
Old Feb 5, 2013, 03:00 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Is that a special kind of widget? Do I need a plugin for that?

But also, isn't there a place within the Atahualpa files where I could add it?
__________________
Emanuel
http://www.sferios.com
  #4  
Old Feb 5, 2013, 03:40 PM
lmilesw's Avatar
lmilesw
 
10,097 posts · Jul 2009
Central New York State USA
I don't remember the name of the plugin off hand but if you do a search on wordpress.org it shouldn't be hard to find. I would add the new widget area code to the kicker box. If you add it to a theme file it will get overwritten with a theme upgrade. The only time I edit theme files is when there is a patch.
__________________
~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.
  #5  
Old Feb 5, 2013, 07:26 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Well according to the instructions in the "Add New Widget Area" section, the only way to add a widget area to the center column is to edit a theme file. Here is what it says:

"Style & edit CENTER COLUMN: If you want to add a widget area to the Center Column, you must edit "index.php" in the theme folder and add the widget area code there."

Interestingly, just below that it says:

"Technically, you could also hard code widget areas into one of the Atahualpa files such as index.php, header.php or footer.php (by using the code as shown below). You should avoid this though, because you'd have to re-do these file edits whenever you upgrade to a new version of Atahualpa."

So if I have to edit the theme file anyway, I might as well just post the php tag directly, right? This saves a step rather than hardcoding a widget area, installing a php compatible text widget, and then putting the php tag in the widget.

Or am I missing something?

And lastly, I actually have been able to make the image appear by putting the php tag right in the index.php file, either just above or just below the kicker box. But if I wanted to make it appear *inside* the kicker box, on the same line, that is, with the rest of the kicker, where would I put the tag? Here is the tag:

<?php c2c_the_category_image(); ?>

And here is the kicker box tag inside the index.php file (along with the line just below it):

<?php bfa_post_kicker('<div class="post-kicker">','</div>'); ?>
<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
__________________
Emanuel
http://www.sferios.com
  #6  
Old Feb 5, 2013, 08:22 PM
lmilesw's Avatar
lmilesw
 
10,097 posts · Jul 2009
Central New York State USA
I would add the new widget code to one or all of the kicker boxes in the "Edit Post/Page Info items" section of the theme options. Then I would install this plugin which provides a widget where you can put php 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.
  #7  
Old Feb 5, 2013, 11:03 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Ok well just to be sure here... you are telling me to ignore the instructions in Atahualpa itself. The instructions clearly say this:

"If you want to add a widget area to the Center Column, you must edit "index.php" in the theme folder and add the widget area code there."

I'll give it a try.
__________________
Emanuel
http://www.sferios.com
  #8  
Old Feb 5, 2013, 11:57 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Well it's working with one exception. I put new widget code in all three kicker boxes (home page, multi-post pages and single-post pages), but my new widget areas are only appearing in two of them. It is not appearing in multi-post pages. I have refreshed and refreshed many times.

That said, the plugin you gave me works fine. So all is well except I can't get that third widget area to appear.

BTW, I added three different new widget areas, meaning they all have different names. I did not put the same new widget code into all three kicker boxes. Was that correct?
__________________
Emanuel
http://www.sferios.com
  #9  
Old Feb 6, 2013, 11:14 AM
lmilesw's Avatar
lmilesw
 
10,097 posts · Jul 2009
Central New York State USA
I would put the same widget area code in all the boxes.
__________________
~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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How To Change H1 Tags On Pages - Can't Find Page Template In Code pokepsw Center area post/pages 7 Feb 7, 2011 11:29 AM
How to convert Atahualpa 3 columns template into 2 colums template? phboujon Page & Category Menu Bars 3 Jun 7, 2010 04:05 AM


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


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