• Resolved avatar33

    (@avatar33)


    Hi,

    I just started using this plugin. I have a customized author.php page that displays details about the author (Full Name, Photo, etc…) but I want it to also display 2 additional custom fields I added (Occupation and Location).

    How do I do that? Is there any php function I can call to display all the custom fields on a page?

    Thanks and keep up the great work!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author radiok

    (@radiok)

    I’m pretty sure I can assist, but first, what function are you using to get any data about the author, like, Full Name?

    Thread Starter avatar33

    (@avatar33)

    $curauth->first_name;
    $curauth->last_name;

    Thread Starter avatar33

    (@avatar33)

    These functions

    $curauth->first_name;

    $curauth->first_name;

    Plugin Author radiok

    (@radiok)

    What load’s $curauth? Is it get_userdata()?

    Plugin Author radiok

    (@radiok)

    OK, I looked into it, I think it is. Anyway, if let’s say you have a custom field, “Middle Name”, you would access that $curauth->middle_name. Redux coverts all spaces to underscores, and any odd characters to dashes. So if you have a custom filed like, “DOB (MM-DD-YYYY)”, you would reference that as “dob_-mm-dd-yyyy-“, does that make sense? Let me know if that doesn’t work for you.

    Plugin Author radiok

    (@radiok)

    avatar33, did that work for you?

    Thread Starter avatar33

    (@avatar33)

    radiok, I haven’t tried yet as I’m trying to fix a few urgent bugs that came up yesterday, but I appreciate you coming back to me. Thanks a lot for your help! I’ll post back here when I try your solution.

    Thread Starter avatar33

    (@avatar33)

    radiok, it worked! Wow that was simpler than I thought. Thanks a lot for your help! Keep up the good work.

    Plugin Author radiok

    (@radiok)

    No problem, let me know if there’s anything else you need.

    Hello Radiok, I love this plugin, just what I needed. I am just confused how to show membership page. I keep seeing author.php but have no idea the next step.
    My site: https://www.ballardapprenticeship.co.uk/
    Any help would be greatly appreciated.

    Plugin Author radiok

    (@radiok)

    AmR users might be worth looking at. It’s a plugin you can install that you could set up a user list with. Then add a Page with the proper wordpress shortcode for the user list you generated. AmR users is a very powerful plugin, but pretty complicated. Let me know if you need any help.

    https://www.ads-software.com/extend/plugins/amr-users/

    Hello radiok, I’ve got a problem when I try to show some custom fields on a page, that acts as a summary of the information of the current user.

    In my page I’m trying to use:

    global $current_user;
    $current_user = wp_get_current_user();
    $user_info = get_userdata($current_user->ID);
    
          echo('Username: ' . $user_info->user_login . "<br/>");
          echo('User level: ' . $user_info->user_level . "<br/>");
          echo('User ID: ' . $user_info->ID . "<br/>");
          echo('Provincia: ' . $user_info->provincia. "<br/>");
    ?>

    Where “provincia” is one of the custom fields I’ve added inside RPR.
    Unfortunately nothing is showing next to “Provincia:” in my page.

    Any suggestion?

    Thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Register Plus Redux] How to display the custom fields in the author page?’ is closed to new replies.