[resolved] Author specific date page (2 posts)

  1. markbadger
    Posted 10 years ago #

    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.


  2. markbadger
    Posted 10 years ago #

    I solved the issue. In the loop, use:

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



Topic Closed

This topic has been closed to new replies.

About this Topic