Author Name… Custom Field

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 9 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #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.

    Ernest Marcinko
    Ernest Marcinko


    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.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘Related Posts Pro for WordPress Support’ is closed to new topics and replies.