Home Forums General Pre-Purchase Questions Dispaying Custom User Fields

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Tareq Hasan 5 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15078

    campbellr
    Member

    I have read in the documentation that it is possible to display custom post fields using shortcodes, e.g. using the shortcode [wpuf-meta name=”your_meta_key”] for simple fields.

    Is it also possible to display custom user profile fields using shortcodes?

    So for example; I might want to have a custom user profile field called ‘favorite-color' as part of a profile form. So I would want to be able to display that field for the current logged in user within a page or post (I don't mean the whole profile, only selected fields).

    Thanks

    Robert

    #15100

    Tareq Hasan
    Keymaster
    Post count: 2831

    Sorry, currently no shortcodes available for user meta.

    By editing your theme little bit with just using this lines:
    [php]<?php echo get_user_meta( $PUT_THE_USER_ID, ‘META_KEY_HERE', true ); ?>[/php]

    #15195

    campbellr
    Member

    Hi Tareq

    I use the Toolset developer plug-in which has shortcodes to display user
    meta. Have you any knowledge of this plug-ins (sometimes called ‘Types')?

    Can you tell me if the custom user fields created by your plug-in are to the
    same format as the standard WP user fields? Or do they use a special
    prefix? If they are standard then the Toolset plug-in should be able to
    display them using their shortcodes.

    Regards

    Robert

    #15212

    Tareq Hasan
    Keymaster
    Post count: 2831

    Yeah I heard about types, although didn't tried it yet. There is no prefix in the pro version, although it was in the free version. I guess using types would just do fine.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Dispaying Custom User Fields’ is closed to new replies.