WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Author specific date page

[Resolved] Author specific date page

  • Hi,
    I am trying to create an author specific date page. When a users is on my author page, they see the date archive (listed by month) in the sidebar. If the user selects the month, it goes to the date page. I have added the author ID in the URL and parse the URL to get the author ID on the date page. I can display the author ID ($curauth), but my add_filter is not working.

    I have placed the following directly above the Loop on my Date page.

    add_filter('posts_where', 'author_filter_query', 10, 2);

    With the author_filter_query defined as:


    function author_filter_query($where, $curauth) {
    return " AND post_author =".$curauth->ID;
    }

    It is not limited the author on the Date page. Any suggestions? Thanks.

    Mark

Viewing 1 replies (of 1 total)
  • I solved the issue. In the loop, use:

    if(($curauth) && (the_author('login') == $curauth->display_name)){

    Thanks.

    Mark

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Author specific date page’ is closed to new replies.