Support » Themes and Templates » Listing both blog entries and pages in author template

  • I may be overlooking something really obvious, but here’s my issue: when I use the sample author.php template, has_posts() returns only the blog entries for the specified author, not the pages.

    Is there an equivalent to has_posts() for pages (called has_pages(), or something similar)? If not, how would I go about circumventing the problem and list pages for a specific author?


Viewing 2 replies - 1 through 2 (of 2 total)
  • There is no “has_post” – there is “have_post”, although that does NOT refer to the author > it is part of The_Loop.

    I don’t know of any query that would retrieve the Pages since they are not part of the chronological stream of the post type entries, so the regular WP queries don’t show them.

    Well, what makes little sense is that, when I show the number of “posts” made by a particular author on the sidebar with wp_list_authors(), the number corresponds to the sum total of both number of posts and number of pages.

    When I click on the author to view his/her profile page, only the posts are listed, so it looks as though there’s information missing.

    And I really don’t see why pages shouldn’t be listed. It would be appropriate to see that information as well when viewing an author profile.

    I’ll try and find a workaround.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Listing both blog entries and pages in author template’ is closed to new replies.