subscribe2 and co-authors plus (3 posts)

  1. twlack
    Posted 4 years ago #

    I use co-authors plus because I have several authors that work together to create a single post.

    I am trying to use Subscribe2 to send HTML emails to subscribers.

    I added a byline to the email but it is not picking up the multiple authors set by co-authors-plus.

    I suspect I can edit where Subscribe2 picks up the authors so that it gets it from co-authors plus thereby listing multiple authors in my byline. But I can't seem to find where. Right now it picks up only the first author listed. Anybody?


  2. mattyrob
    Posted 4 years ago #


    Subscribe2 pulls the author from the $wpdb->posts table in the database. the 'post_author' field contains the author ID which Subscribe2 then calls a get_userdata() on.

    I suspect that the co-authors plus plugin stores contributors elsewhere so you'd need to pull the data from that location instead. In Subscribe2 you need to look at the publish() function for per-post emails and the subscrbe2_cron() function for digest based emails.

  3. Daniel Bachhuber
    Hand Built
    Posted 4 years ago #

    If you're modifying templates, there's a get_coauthors() function you can pass the post_id to. It will return an array of WP User objects.

    Alternatively, you might be able to use one of the template tags in the file.

Topic Closed

This topic has been closed to new replies.

About this Topic