• Resolved paologanino

    (@paologanino)


    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>
    							<hr/>
    <?php while($i->iterate()){ ?>
    <div class="thumb">
    <?php echo get_avatar( get_the_author_meta('user_email'), '100', '' ); ?>
    </div>
    <div class="description">
    <strong><?php the_author_posts_link(); ?></strong><br/>
    </div>
    <div class="description">
    <p><?php the_author_meta('description'); ?></p></div>
    <?php } ?>

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter paologanino

    (@paologanino)

    solved! the plugin had automatically been deactivated after the upgrade

    Plugin Author Mohammad Jangda

    (@batmoo)

    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
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Co-Authors Plus] Error after updating’ is closed to new replies.