Support » Plugins » Hacks » Modifying Author Archive to include Custom Post Types and Pagination

  • Resolved jimmiejo

    (@jimmiejo)


    I’m having a bit of a problem with custom post types and author archives.

    By default, the author.php will return posts by the selected author. I’m working on a build that only uses custom post types, and need to show just these custom types on the author archive page.

    It’s easy enough to query just a custom content type in that template:

    query_posts( 'post_type=products' ); if (have_posts())

    …as found here: http://www.wpquestions.com/question/show/id/1862 — but that results in broken pagination (domain.com/author/their-name/page/2/ returns the 404 page).

    And I’ve tried Michael’s simple tip for paginating a wp_query = http://wordpress.org/support/topic/authorphp-post-problem#post-1233086, but that didn’t do the trick either.

    Would really appreciate it if anyone could point me in the right direction for returning only specific custom content types on author archive pages, and have the pagination work.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Modifying Author Archive to include Custom Post Types and Pagination’ is closed to new replies.