• Resolved zapata

    (@zapata)


    Trying to use my minimal programming skills to hack wp_list_authors()

    The objective is to not show in the list all authors who have an email : [email protected]

    I’m using this email for all authors on my multi author blog that have retired

    So in the sql query of wp_list_authors() I would like to add condition that : user_email <> ‘[email protected]’… this way I may be able to filter out all retired/inactive authors from the list and yet have their posts intact.

    Any help/pointer to the file will have highly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter zapata

    (@zapata)

    sorry… i think I may have some confused…

    all i need to find is the file where wp_author_list is defined.

    Thread Starter zapata

    (@zapata)

    I think I’ve got it… the list now displays only authors that are active on my blog.

    I found the function in the author-template.php and modified the following query

    $query = “SELECT ID, user_nicename from $wpdb->users ” . ($exclude_admin ? “WHERE user_login <> ‘admin’ ” : ”) . ” AND user_email <> ‘[email protected]’ ORDER BY display_name”;

    The change is adding : AND user_email <> ‘[email protected]

    before: ORDER BY display_name

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where to hack wp_list_authors()’ is closed to new replies.