• HI. Friendly fellow WordPress users.

    I have been using WordPress for quite a while now, but never anything involving custom fields.

    So I have what I thought would be a simple thing and a common thing but I cant find out how to do it.

    I want to add some custom fields to a user.

    When they login I want them to go to a page which shows the custom fields attached to their user account.

    I’m using PODS and WordPress and Elementor (I have to use WordPress and Elementor).
    I can see the filed in the user ver in the dashboard to fill them with dummy data.

    But when I create a page and, using Elementor pro, set the dynamic data to the POD and then set the key to the right filed. Nothing shows.

    So I tried a shortcode and I inserted the correct shortcode for the pod/field. Nothing shows.

    I tried ACF, but still the custom data does not show for the user viewing the page.

    Yes, I watched all the tutorials, but they all talk about creating templates.

    I just want all the users to go to the same page and for that page to show their info. Oh, by the way <span style=”text-decoration: underline;”>it works</span> for all WordPress fields (I can have the dynamic content show their WordPress user, name etc).

    >> All I want to do is: (using Elementor).

    Add custom fields to a user.
    Build an Elementor page with those custom fields so that when the user goes to that page they will see the content attached to their profile.

    That is all.

    Any plugin/solutions welcome.

    (Bonus points: being able to let the user edit their content would be good).

    I have no knowledge of PHP whatsoever so would prefer a “no code” solution.

    I would appreciate any help given.

    • This topic was modified 2 years, 10 months ago by bcworkz. Reason: formatting fixed
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bcworkz

    (@bcworkz)

    Default WP does not support custom fields for users, only posts. You do need a plugin to implement user custom fields. Most plugins have a dedicated support channel of some sort for help related to that specific plugin. I recommend asking in such a place for whichever custom fields plugin you like best.

    Thread Starter andrewwatson

    (@andrewwatson)

    Yes, of course- I went there first. I have been working on this for weeks (on an off).

    I can create the custom fields in ACF or PODS but I can’t get them to appear on a page either by shortcode or buy simply choosing the key field in Elementor.

    Actually creating the custom fields was easy.

    Seeing them on a page, not so much.

    So I thought I would ask here for a new perspective.

    • This reply was modified 2 years, 10 months ago by andrewwatson.
    Moderator bcworkz

    (@bcworkz)

    If you make a new post by using the default editor instead of Elementor and include the user custom field shortcode, does its output appear in the post when viewed?

    If it works in default editor content but not Elementor, then I would direct you to Elementor’s support forum. The expert users and devs there are in the best position to help you with Elementor issues.

    Thread Starter andrewwatson

    (@andrewwatson)

    No. The short code does not display anything on a simple WordPress page with Gutenburg. It does display an error if the short code is wrong and doesn’t reference a valid field.

    Also the same is with ACF.

    (!) I am sure the problem is this is because the fields are user fields and I want them to display on a ‘page’, but silly me, I thought there would be a way to use a shortcode or Elementor pro to simply say “display this field here”.

    Other plugin ideas are welcome. As stated before I think my needs are fairly basic: Add data to users. Send them all to one page which would show the user data of the person logged in.

    I can’t be the only one in the world who is trying to do that, obviously I am going about it the wrong way. In this case Google is not your friend because it shows you 1000 results of custom pages with WordPress default user fields (which work perfectly and got that in 5 mins), but I can’t find out how to:

    Make custom user field(s). Create a page that shows the content of the custom fields for the logged on user.

    Any solution welcome.

    • This reply was modified 2 years, 9 months ago by andrewwatson.
    Moderator bcworkz

    (@bcworkz)

    I am sure the problem is this is because the fields are user fields

    I’m inclined to agree, but it is feasible to to output the field value if the related user is known, such as the post’s author or the current user. If no user is known, output nothing. I wasn’t sure if the standard shortcodes offered by plugins like ACF did that or not. This is why I suggested their dedicated support forum.

    You can still use ACF or similar to manage the custom user field in the back end. You’re free to develop your own shortcode that accomplishes what you want if such a shortcode isn’t already available from the plugin.

    If you decide to develop your own shortcode and such a thing is new to you, I’ve one tip to avoid a common error: Shortcode handlers must never generate output. Collect all desired output into a single variable that’s returned to the caller. WP will echo out the returned value when the time is right.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom user fields on Elementor page.’ is closed to new replies.