Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Displaying a custom field? (http://forum.bytesforall.com/showthread.php?t=20532)

emanuel1969 Jun 21, 2013 12:44 PM

Displaying a custom field?
 
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

emanuel1969 Jun 21, 2013 12:55 PM

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!

jerryc Jun 21, 2013 01:25 PM

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.

CrouchingBruin Jun 21, 2013 02:24 PM

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.

PsychoSoad182 Jun 28, 2013 12:03 PM

I am not able to use custom fields in Montezuma. This is still not compatible with the theme?


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

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