• I set up functions.php so that my co-authors’ archive pages would display my custom post type (instead of posts and pages). Everything is working beautifully except the post count, which is messing up coauthors_wp_list_authors—only the authors who have posts are being linked, even if they have multiple custom post type posts. How would you recommend I tell the plugin to count custom post types instead?

    http://wordpress.org/extend/plugins/co-authors-plus/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi! I have the same problem, custom post types don’t appear for the author, not even in the authors admin page..

    Did you find any solutions to this?

    Thread Starter notkristina

    (@notkristina)

    Hi Daniel, I’m afraid I haven’t found any solution. No one has responded on this forum and I don’t know where else to look.

    danielboros

    (@danielboros)

    Thanks for the reply – I’ll let you know if I come up with something!

    Thread Starter notkristina

    (@notkristina)

    Looking at the query being submitted for a co-author’s archive page, we can see that we’re looking up the taxonomy term ID (in this case, 57) as opposed to the co-author ID (in this case, 111). We might be able to insert a custom post counter if we knew how to relate these two numbers for the purpose of looping through a custom query.

    SELECT SQL_CALC_FOUND_ROWS cw_posts.ID FROM cw_posts LEFT JOIN cw_term_relationships ON (cw_posts.ID = cw_term_relationships.object_id) LEFT JOIN cw_term_taxonomy ON ( cw_term_relationships.term_taxonomy_id = cw_term_taxonomy.term_taxonomy_id ) WHERE 1=1 AND (( (cw_term_taxonomy.taxonomy = 'author' AND cw_term_taxonomy.term_id = '57'))) AND cw_posts.post_type = 'listing' AND (cw_posts.post_status = 'publish' OR cw_posts.post_status = 'private') GROUP BY cw_posts.ID HAVING MAX( IF( cw_term_taxonomy.taxonomy = 'author', IF( cw_term_taxonomy.term_id = '57',2,1 ),0 ) ) <> 1 ORDER BY cw_posts.post_date DESC LIMIT 0, 12

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    notkristina, can you share the code you’re using in your functions.php file and on the archive page, so I can get a better sense of what you’re trying to do?

    I’m thinking you should be fine if you pass the 'hide_empty' => false argument to coauthors_wp_list_authors()

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Authors' post count isn't including custom posts types’ is closed to new replies.