WordPress.org

Ready to get started?Download WordPress

Forums

Pods - Custom Content Types and Fields
[resolved] Display user meta in PHP (4 posts)

  1. Sikth
    Member
    Posted 9 months ago #

    Hi!
    I've created a custom user meta field, or WYSIWYG-field, named "info". I want to display this in the author page, with PHP.
    Please, point out the direction to where i can find this code?

    //Fredrik

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

  2. Scott Kingsley Clark
    Member
    Plugin Author

    Posted 9 months ago #

    Try get_user_meta using http://codex.wordpress.org/Function_Reference/get_the_author_meta to get the ID

    echo get_user_meta( get_the_author_meta( 'ID' ), 'info', true );

    Alternatively, we also have a function in Pods available which handles most display-related functionality.

    http://pods.io/docs/code/pods/display/

    Or if you only just need that one field, this could be handy:

    http://pods.io/docs/code/field-functions/pods-field-display/

  3. Josh Pollock
    Member
    Plugin Author

    Posted 9 months ago #

    You may also want to check out a tutorial series I wrote about using Pods to create a user directory. It shows various ways to integrate fields from user meta into a theme.

    http://pods.io/tutorials/using-pods-create-user-directory/

  4. Sikth
    Member
    Posted 9 months ago #

    Thank you! Works great!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.