Co-Authors Plus
[resolved] Error after updating (3 posts)

  1. paologanino
    Posted 5 years ago #

    After updating from 2.1.1 to 2.5.1 i get this error on my posts:

    Fatal error: Class 'CoAuthorsIterator' not found in single.php on line 143

    I have an author box on my posts and i am using an iterator to show coauthors.

    Any help please?

    This is my code

    <?php $i = new CoAuthorsIterator(); ?>
    <div id="about_the_author">
    <div class="header"><h5>Autore</h5></div>
    <?php while($i->iterate()){ ?>
    <div class="thumb">
    <?php echo get_avatar( get_the_author_meta('user_email'), '100', '' ); ?>
    <div class="description">
    <strong><?php the_author_posts_link(); ?></strong><br/>
    <div class="description">
    <p><?php the_author_meta('description'); ?></p></div>
    <?php } ?>


  2. paologanino
    Posted 5 years ago #

    solved! the plugin had automatically been deactivated after the upgrade

  3. Mohammad Jangda
    Plugin Author

    Posted 5 years ago #

    It's always a good idea to use things like function_exists and class_exists when using code from external plugins. In your case, something like:

    if( class_exists( 'CoAuthorsIterator' ) ) {
        $i = new CoAuthorsIterator();
        // rest of your code
    } else {
        // add a fallback here

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Co-Authors Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic