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 » Montezuma Theme »

Displaying a custom field?


  #1  
Old Jun 21, 2013, 12:44 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Hi everyone. I'm getting very close to finishing my first Montezuma site. It's awesome to be able to create templates this way. Thanks! Quick question, though...

I want to display a customized byline for each post. In my ATA websites I simply create a custom field and then call that field up inside a widget area that I place in the loop, using a widget that allows php code. Do I need to do it this way in Montezume too? Or is there a way to add some php directly in the single.php template that will display my custom field.

Thanks!
Emanuel
__________________
Emanuel
http://www.sferios.com
  #2  
Old Jun 21, 2013, 12:55 PM
emanuel1969's Avatar
emanuel1969
 
133 posts · Apr 2010
California
Send a message via Skype™ to emanuel1969
Actually let me clarify... In ATA, the way I display the byline is by putting the following code into the appropriate field inside the "Edit POST/PAGE INFO ITEMS" section:

%meta('Byline')%

Now I'm assuming this code will NOT work anywhere in Montezuma. So I instead need to use some php code to display this custom field. To do that, I inserted a dynamic sidebar into the single.php template, and I have a php-enabled text widget that I can use to add the php code. I just don't know what php code to add to display this field?

Can someone help me?

Thanks!
__________________
Emanuel
http://www.sferios.com
  #3  
Old Jun 21, 2013, 01:25 PM
jerryc
 
367 posts · Oct 2012
Florida
The limited allowed php code is on a tab in the upper right under dashboard > appearances > mz options.

If it's not in the limited code, check the wp documentation. Somebody's probably already invented this wheel.
  #4  
Old Jun 21, 2013, 02:24 PM
CrouchingBruin's Avatar
CrouchingBruin
 
299 posts · Aug 2010
Santa Monica, CA
The Wordpress Codex Function Reference has a section that lists the functions you can use for custom fields. get_post_meta is probably the one you want.
__________________
My Montezuma-themed sites: ESHS Girls Basketball Team, Venice Hongwanji Buddhist Temple
Please consider making a donation to BytesForAll for their great themes!
  #5  
Old Jun 28, 2013, 12:03 PM
PsychoSoad182
 
1 posts · Jun 2013
I am not able to use custom fields in Montezuma. This is still not compatible with the theme?

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Show custom field in kicker - only IF field value exists jaxon Center area post/pages 13 Feb 6, 2013 01:11 PM
Custom field template tag ripz7 Montezuma Theme 2 Nov 5, 2012 01:29 PM
Using a custom field within an excerpt... or trying to arthurmild Excerpts, Read more, Pagination 4 Jan 5, 2011 04:40 AM
Button with Custom Field Xethon Sidebars & Widgets 0 Sep 17, 2010 04:08 AM
Custom field image with custom field link mbastos Atahualpa 3 Wordpress theme 1 Jul 1, 2010 08:17 AM


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


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