• Author pages for a specific guest author were getting 404 errors on the 3rd page.

    https://mzinedev.wpengine.com/author/bob-knetzger/page/3/

    We utilize the filter coauthors_supported_post_types to add custom post types to the co author query like so.

    add_filter(‘coauthors_supported_post_types’, ‘mz_coauthors_supported_post_types’);

    function mz_coauthors_supported_post_types( $post_types ) {

    $post_types[] = ‘products’;

    $post_types[] = ‘projects’;

    $post_types[] = ‘reviews’;

    return $post_types;

    }

    Prior to the 3.5.2 update, this worked. After the update, it no longer included the custom posts types on the author page. The author has 12 regular post types and x number of custom post types that were no longer returned. When we rewrite the query, it reflects the number of posts we would expect in the pagination, but not in the pages, and we can get all the posts and custom posts returned if we increase the results per page.

    Here is our rewrite to the query that shows the right amount of pagination:

    global $wp_query;

    $wp_query->query_vars[‘post_type’] = array(‘post’,’products’,’projects’);

    $wp_query->query_vars[‘posts_per_page’] = 10;

    query_posts( $wp_query->query_vars );

    This issue seems to have been introduced in your plugin sometime since version 3.5.2. We have reverted back to that version and it has fixed our issue, but we would like to have this issue addressed so we can stay up to date.

    (We had already tried disabling all other plugins and switching to a base theme)

    The page I need help with: [log in to see the link]

  • The topic ‘Co-Author update stopped counting custom posts in pagination’ is closed to new replies.