Support » Plugin: Pods - Custom Content Types and Fields » Calling custom fields from a specific pod item

  • Resolved Olly – OWMC


    I want to call a specific item in a pod. That item has a few fields which I also want to call.

    I have tried using this code:

    But the problem with this is that it calls all the items in the pod. I only want to call 1 specific pod item. Which shouldn’t require so much code. I am able to call the pod item with this typical wordpress post query:

    However I don’t seem to be able to call any of the pod item’s fields. I assume this is because Pods use different fields which aren’t compatible with wordpress post queries.

    Either way, is there a nice small bit of php that will allow me to do this? Either using the wordpress post query i linked to above or a pod query similar (but shorter) to the one from Monday By Noon.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Scott Kingsley Clark


    We use the WordPress standard for all of our fields, try using:

    $field_value = get_post_meta( $queried_post->ID, 'field_name', true );

    Ah! i see. I’ve just tried that quickly and it didn’t work for me.

    <p><?php $position_value = get_post_meta( 56, 'position', true ); ?></p>

    Yet my pod item is 56 and the field i want to call is named “position”, so not sure why it’s not showing. Do i need to put an echo in there?

    As this is a standard wordpress call, perhaps i should post my question outside of the Pods support forum.

    By the way, I absolutely love Pods to bits. It really allows me to give my clients a super-simple way to manage content. I really feel that Pods should be integrated into WordPress core. You’ve opened up so many possibilities you’re making me think twice about learning Joomla. Brilliant work.

    Plugin Author Scott Kingsley Clark


    Awesome and thanks!

    For get_post_meta reference, check this out:

    Yes, it returns a value, so you would need to echo it where you want.

    got it! nice.

    <?php echo get_post_meta( 56, 'position', true ); ?>

    This topic is resolved.


    For those looking for how to display User field data, use

    <?php echo get_user_meta( $theuser->ID, 'field_name', true ); ?>

    I found this page, looking for the answer I just posted, so I thought it might help others.

    Plugin Author Scott Kingsley Clark


    Also, the same apply for comments too, get_comment_meta

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Calling custom fields from a specific pod item’ is closed to new replies.