Home › Forums › Product Support Forums › Related Posts Pro for WordPress Support › Author Name… Custom Field
This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko 7 years, 10 months ago.
- AuthorPosts
- March 27, 2015 at 11:01 pm #4347
I hope that i can explain well.
in custom format option have a field: Author field format that have a value {authorfield}, but this value return the name of author that he use for login, the name of author that wordpress use is the public name, that use the first name and last name together if i want… because i can choose how i want the name will display. So in my post and in my others plugins i use the public name, not the name of author, because this is i used only for login. I hope that I have been able to explain it.
My question is: have a custom field to take this name… the public name… or i will need to make others changes in the code?Thanks for your attention.
March 30, 2015 at 9:51 am #4355Hi!
I think I understand. You want to use the correct display name of the users, not the “username”.
You will need to make a minor modification to the code for this to work.
Open up the wp-content/plugins/related-posts-pro/includes/related_content.class.php file.
You will need to change this string:
$wpdb->users.user_nicename as author,
… to this string:
$wpdb->users.display_name as author,
On the following lines: 89, 319, 546, 688, 721 and 746
Then go to the related posts pro options page and save the options without changing them. The author than should appear with the correct name.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.