We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Displaying Member Custom Fields in Entries

How Do I?

avori's avatar
avori
60 posts
11 months ago
avori's avatar avori

Hello,

I have some custom fields setup for members, First, Last, Company, Job Title, etc. And they will be able to publish entries in one of the channels, making them the author.

How can I display the members (author in this case) custom fields in my template?

Thanks, Viktor

       
Russ K.'s avatar
Russ K.
172 posts
11 months ago
Russ K.'s avatar Russ K.

Hello,

You should be able to easily show that information from within your {exp:channel:entries} tag using the following code:

{exp:member:custom_profile_data username="{author}"}
  {age}, {gender}
{/exp:member:custom_profile_data}

The Documentation for this can be found here:

https://docs.expressionengine.com/latest/member/custom-profile-data.html

R

       
avori's avatar
avori
60 posts
11 months ago
avori's avatar avori

Hi Russ,

Thanks for the help. However, the username=”{author}” parameter didn’t show anything. I removed and using {exp:member:custom_profile_data} tag inside of {exp:channel:entries} tag pulls up the right information. However it only shows the data to logged in users, which is fine for my application.

       
fmsi196's avatar
fmsi196
1 posts
10 months ago
fmsi196's avatar fmsi196

Displaying the author’s first name: css Copy {author_custom_field:first_name} Displaying the author’s last name: css Copy {author_custom_field:last_name} Displaying the author’s company: css Copy {author_custom_field:company} Displaying the author’s job title: css Copy {author_custom_field:job_title} These tags will output the corresponding custom field values for the author of the current entry. mapquest driving directions

       
AnastasiaKertzmann's avatar
AnastasiaKertzmann
2 posts
9 months ago
AnastasiaKertzmann's avatar AnastasiaKertzmann

Hi Viktor,

To display member custom fields in your template, you’ll need to use EE’s tag pair functionality to pull in the author’s data. For more tips, explore Pokerogue and the Pokerogue wiki . Good luck!

       
hygienistfree's avatar
hygienistfree
2 posts
6 months ago
hygienistfree's avatar hygienistfree

Hi Viktor,

To display the custom fields for authors in your template, you’ll need to ensure that you’re pulling the relevant data from your members’ profiles. Check the documentation for your platform to find the functions or methods that retrieve custom user fields. Once you have that, you can modify your template to include something like {{ author.first_name }}, {{ author.last_name }}, or whatever the specific syntax is for your setup. Make sure to test it out with a few entries to confirm everything displays correctly. If you need more specific help, sharing your platform details could be useful! Good luck! ragdoll hit

       
winola's avatar
winola
3 posts
4 months ago
winola's avatar winola

Thank you for asking about displaying custom member fields! While working on website development, having the right atmosphere can enhance productivity. Corruptbox ets you create focus-enhancing background music - perfect for coding sessions when customizing templates and working with user data fields.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.