This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Author Name… Custom Field

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4347
    stephanaugustostephanaugusto
    Participant

    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.

    #4355
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    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:

    [code]$wpdb->users.user_nicename as author,[/code]

    … to this string:

    [code]$wpdb->users.display_name as author,[/code]

    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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Related Posts Pro for WordPress Support’ is closed to new topics and replies.