WordPress.org

Ready to get started?Download WordPress

Forums

Pods - Custom Content Types and Fields
[resolved] What is the meta name for field names? (9 posts)

  1. Stacy (non coder)
    Member
    Posted 5 months ago #

    The shortcode gives the id but I would like to know the names in order to specify them in another plugin.

    http://wordpress.org/plugins/pods/

  2. Stacy (non coder)
    Member
    Posted 5 months ago #

    Is it pods_meta_fieldname or pods-form-ui-pods-meta-fieldname?

    Thanks.

  3. Josh Pollock
    Member
    Plugin Author

    Posted 5 months ago #

    The name of the field is the name of the meta field. Presuming you are using meta storage, not table storage you can get the value for the field 'example' with get_post_meta( $id, 'example');. Just be sure to specify $id properly.

  4. Stacy (non coder)
    Member
    Posted 5 months ago #

    user meta key for custom user fields?

  5. Josh Pollock
    Member
    Plugin Author

    Posted 5 months ago #

    Same principle, but using get_user_meta() instead.

    http://codex.wordpress.org/Function_Reference/get_user_meta

  6. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 5 months ago #

    Worth noting that "pods_meta_{$name}" is the format of our form fields so they don't conflict with other inputs on the editor screen.

    So you always just reference the field name in meta_key usage.

  7. Stacy (non coder)
    Member
    Posted 5 months ago #

    Thank you. So any pointers for using these names in shortcodes if it has to be ${name} ?

    Trying to use a custom profile field "height" in Formidable Plugin's field shortcode [user_meta key=whatever]. It's supposed to pull the current user's value for the user field to display on the front end. Although it's not working and they suggest it must be a wrong name.
    Tried [user_meta key=height],[pods_meta key=height], [pods_meta key=$height], [user_meta key=pods_meta_height],
    [user_meta key=pods_form_ui_pods_meta_height],
    [pods_form_ui_pods_meta key=$height]
    [pods_form_ui key=pods_meta_height]
    [pods_meta key=user_height]
    [user_meta key=pods_meta_user_height] (rendered empty)

    In some cases it rendered the shortcode , in other cases it rendered empty. E
    Either way I'll need to use the names in shortcodes from time to time.

  8. Stacy (non coder)
    Member
    Posted 5 months ago #

    Will try this with php between shortcodes. Trying to learn.

    What is the line to display the current user's height (pod field) please?
    (reading in codex that "get" refers to something different than display)

    Figured out the Formidable thing.

  9. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 5 months ago #

    [pods field="height"] assuming postdata is already setup in the globals.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.