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 » Atahualpa 3 Wordpress theme » Center area post/pages » Post-Kicker, -Byline & -Footer »

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


  #1  
Old Apr 14, 2009, 07:53 PM
Antsliedown
 
5 posts · Apr 2009
Need help with "%meta('fieldname')%"

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?
  #2  
Old Apr 15, 2009, 07:40 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
A bug it seems, still looking... Thanks for finding
  #3  
Old Apr 15, 2009, 10:52 PM
Antsliedown
 
5 posts · Apr 2009
Thanks for the response. I thought I was losing it. I'll stop banging my head.
  #4  
Old Apr 21, 2009, 12:52 AM
shi
 
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.
  #5  
Old Apr 22, 2009, 06:13 AM
Flynn's Avatar
Flynn
 
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));
    return 
$meta_values;

In case there are several custom fields with the same name, it list them all separated by comma.
  #6  
Old May 2, 2009, 08:43 PM
mkny13
 
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

Bookmarks



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 04:21 PM.


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