• Resolved smunk

    (@smunk)


    Hi, I have a post with multiple authors added through your plugin.

    When I call the get_multiple_authors, it returns an array of the correct size, but only the first element contains data, the following elements (the other authors) do not contain any data except the term_id.

    How can I get the ID or meta-data of the other authors apart from the first?

    Thank you,
    Soren

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    Hi @smunk

    Thanks for using PublishPress Authors.

    I just tested the function, and it actually returns for all the authors.

    Could you please more details about your code implementation please?

    Thanks,

    Thread Starter smunk

    (@smunk)

    Thanks for your feedback!

    I basically just installed the plugin, and then added a total of three authors to a post, and inserted some php in the post template like:

    <?php
    $ma =get_multiple_authors();
    var_dump($ma);

    The result is the dump of an array where the first element is populated, but the next two only contains the term_id and then null values.

    I have coded a workaround since I actually can get all information using only the term_id, but it would be nice if the array was properly populated.

    Thanks

    Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    @smunk Can you please try to loop over it and see if it outputs anything? Something like:

    foreach ($authors as $author) {
    echo $author->display_name . '<br />';
    }
    Thread Starter smunk

    (@smunk)

    That works fine, thanks for your reply!

    Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    @smunk You are most welcome!

    We appreciate you using our plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.