Support » Fixing WordPress » custom fields driving me mad

Viewing 5 replies - 1 through 5 (of 5 total)
  • MichaelH

    (@michaelh)

    You should be able to use get_post_meta.

    Related:
    Custom Fields

    Some people swear by:
    http://wordpress.org/extend/plugins/get-custom-field-values/

    kanefulton

    (@kanefulton)

    Cheers, I’m checking these out now. Having a look at get_post_meta, the code seems to require a specific post id, wheras the info will be pulled from any number of categories.

    I’ve also actually tried that get-custom-field-values, I thought it looked the easiest. All I’ve done is copy and paste this code into my custom sidebar:

    ** <?php function c2c_get_recent_custom( $field, $before=”, $after=”, $none=”, $between=’, ‘, $before_last=”, $limit=1, $unique=false, $order=’DESC’, $include_pages=true, $show_pass_post=false ) ?> Template tag for use outside “the loop” and applies for custom fields regardless of post. **

    changing $field with $info , but it’s obviously not working. I’m guessing at this point I should probably try posting on the plugins wall to see if anyone can help with it. I was just wondering if anybody had any quick fix solutions.

    MichaelH

    (@michaelh)

    So what are you trying to do?

    I’ll guess…

    Display all custom field values that are used in posts that belong to category x

    kanefulton

    (@kanefulton)

    Basically, I want writers to be able to choose ‘info’ as a custom field key, then as value, type in (for example)

    1. song 1
    2. song 2
    3. song 3

    and so on. And then that info will appear in the ‘more info’ box in the top left.

    edit: just realised I was talking rubbish in my last post, I’m not trying to pull any posts from anywhere, I’m just trying to display information that’s typed in.

    MichaelH

    (@michaelh)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘custom fields driving me mad’ is closed to new replies.