AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Closed] How to append custom data to members name?

2 Posts
1 Users
0 Reactions
1,098 Views
Posts: 12
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@amityweb)
Eminent Member
Joined: 5 years ago
[#15971]

We want to display every members country after their name on the forums. The Country is a custom field they fill on registration. 

How can we do this please? I cannot find any hook or something to edit this before its output. 

Thanks 


1 Reply
Posts: 12
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@amityweb)
Eminent Member
Joined: 5 years ago

I have found a solution. I used the template override post.php and added in:

<?php echo get_field('country', 'user_'.$member['ID']); ?>

Ideally a hook would be best as I dont like using template overrides in case things change and it breaks the page, or I have to update it, but its working. 

 


Share: