Viewing 1 replies (of 1 total)
  • if you check the admin for these fake authors, you’ll see they have no posts (wp-admin/users.php)

    this thread didn’t cut it in my use case: https://wordpress.org/support/topic/plugin-co-authors-plus-co-author-posts-not-showing-in-author-archive

    but this snippet did:

    function my_fix_the_authors_page($query) {
      if ( !is_admin() && $query->is_main_query()) {
        if (is_author()) {
          $query->set('author_name', $query->query['author_name']);
          $query->set('post_type', array( 'post', 'cpt-one', 'cpt-two' ));
        }
      }
    }
    add_action( 'pre_get_posts', 'my_fix_the_authors_page', 1 );

    (to show all posts from different post types of this user as an author OR as a co-author)

Viewing 1 replies (of 1 total)
  • The topic ‘Archive page not working’ is closed to new replies.