Posts for Page
[resolved] show_meta='true' displays the author's Username (4 posts)

  1. Gary Allman
    Posted 2 years ago #

    show_meta='true' displays the author's Username, I think it should show the author's display name. Showing the author's username is also a potential Security issue.

    [posts-for-page cat_slug='Security' show_meta='true' read_more=' Continue reading →' use_wp_excerpt='true']

    The problem can be seen here: http://barefootbusinessman.net/security/


  2. Gary Allman
    Posted 2 years ago #

    I've applied a temporary fix myself. For anyone else wanting to show the Author's Display Name and not their Username on their posts, this is how to fix it:

    (Applies to version 2.1)

    Edit the file posts-for-page.php in /wp-content/plugins/posts-for-page

    Line 553 replace:

    $userdata->user_nicename; with $userdata->display_name;

    I've added a comment at the end of the line so I can find it again. The complete edited line looks like this:

    $output .= "Posted on " . mysql2date('F j, Y',$child->post_date) . " by " . $userdata->display_name; /* DA Edit. changed user_nicename to display_name */

    Reference information for the get_userdata data function used by Posts for Page to get the author's name: http://codex.wordpress.org/Function_Reference/get_userdata

  3. 04rana
    Posted 2 years ago #

    Great Work. Thanks

  4. Gary Allman
    Posted 2 years ago #

    The fix above still applies - but I don't see the sense in keeping this thread open so I'm marking it as resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts for Page
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic