Support

Account

Home Forums Pre-purchase Questions Add user fileds to profile area and output them in every post

Helping

Add user fileds to profile area and output them in every post

    • nshunz

    • June 15, 2020 at 10:07 pm

    Hello,

    Just writing in to check if this functionality exists in the plugin or no.

    I’d like to add a couple of fields to a the user profile area and then output their contents in the posts.

    These will be some of the fields,

    • Designation
    • Company Name
    • Postion
    • Address
    • Joining Date

    The contents of these fields would then need to be output into the post in 2 ways.

    1. Before the post is generated, outside the WordPress post loop so directly added through the single.php file.
    2. Within the content of the post. Maybe using a shortcode – say [COMPANY-NAME] which will be replaced by the name entered by the logged-in user in his/her profile.

    Please let me know if this can be done using the plugin.

    Thanks!

  • Like anything with ACF, you will need to do the coding, but it can be done.

    1) Before the loop you can use the WP function get_queried_object() to get the post. Using this you can get the author of the post using other WP functions. Then you can use this to get the fields form the authors profile.

    2) To do something like this you would need to build your own custom shortcodes.

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

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.