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 |
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! |
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. |
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.
|
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 08:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.