Support » Plugin: PHP Code Widget » [Plugin: PHP Code Widget] Breaks when more than one is used with this code….

  • Jon

    (@jonpaulwade)


    I have added this code to a sidebar using the widget:

    <?php $numberOfComments = get_comments_number();
    if ($numberOfComments >= 40)
    echo '
    
    <div class="side-widget">
    <a rel="nofollow" href="a-url"><img src="a-url" width="160px" alt="alt" /></a>
    </div>
    
    '
    ?>

    Now, one works fine, but as soon as I add another (right side) I get a blank white screen.

    If I add a second with all the URLs taken out, i.e. just href=”” and img src=”” is does work. So something goes wrong as soon as a second widget requests a URL.

    The working widget works on either side, it is just adding a second that causes failure.

    Also it only fails when it is “activated”, i.e. there are more than 40 comments. So it is safe when sitting quietly in the background.

    Sorry, not really a techy! Any ideas on how to fix it?

    http://wordpress.org/extend/plugins/php-code-widget/

  • The topic ‘[Plugin: PHP Code Widget] Breaks when more than one is used with this code….’ is closed to new replies.