Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

Need help with "%meta('fieldname')%"

Old Apr 14, 2009, 07:53 PM
5 posts · Apr 2009
Though I follow the directions. I can't seem to to display any of my Custom Fields in the footer with the %meta('fieldname')%

Any Help?
Old Apr 15, 2009, 07:40 PM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
A bug it seems, still looking... Thanks for finding
Old Apr 15, 2009, 10:52 PM
5 posts · Apr 2009
Thanks for the response. I thought I was losing it. I'll stop banging my head.
Old Apr 21, 2009, 12:52 AM
5 posts · Apr 2009
London, Canada
I think I found a fix: in functions/bfa_postinfo.php, insert at line 10 (in meta_values()):

global $post;

I was able to use the above code in the theme options page "Post/Page Info Items" to create a byline which only shows if a certain custom field is defined:

<?php global $post; if (get_post_meta($post->ID, 'editor', TRUE)) { ?>
Edited by %meta('editor')%
<?php } ?>

hope this helps; I'd be interested to know if there's a more 'proper' way of fixing this.
Old Apr 22, 2009, 06:13 AM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
I replaced the post meta callback function, the second function from top in bfa_postinfo.php, with this

PHP Code:
// Callback function for post meta replacement
function meta_values($matches) {
$meta_key $matches[1];
// "get_post_custom_values" returns an array. Turn it into a string, separated by commata
$meta_values implode(", "get_post_custom_values($meta_key));

In case there are several custom fields with the same name, it list them all separated by comma.
Old May 2, 2009, 08:43 PM
14 posts · Apr 2009
Thanks Flynn, your code works. Question--is is possible to make these custom fields link to other posts with the same value? Like tags, but filtered down to one attribute that's being tagged.

For example, I'm putting up posts that contain assignments for classes I've taken. One of my custom fields is the course number that assignment was completed for. When I display that custom field under my post (or wherever), could I make it link all other posts/assignments that share that course number in the coursenumber custom field?

Here's the site I'm looking to apply this to: http://www.valdosta.edu/~makastellec/portfolio/?cat=3


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to post on 2 seperate "Pages" or "Cats" TPR Atahualpa 3 Wordpress theme 18 Aug 4, 2010 08:24 PM
where can I rename "categories" and "Pages" into other titling? curious Atahualpa 3 Wordpress theme 5 Apr 28, 2009 03:15 PM
How to style "post icon" and "post comments" text Whatsthatcat? RSS, Feeds & Subscribing 3 Apr 1, 2009 09:41 AM
Flexx theme - How to change my "List Category or Archives" to "List Titles ONLY" ?? idaks01 Post-Kicker, -Byline & -Footer 0 Mar 28, 2009 05:22 PM
modifying font size of "Today's Events" and "Upcoming Events" in sidebar ritland Forum How-To 0 Mar 16, 2009 03:23 PM

All times are GMT -6. The time now is 07:34 AM.

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