Support » Plugin: PHP Code Widget » [Plugin: PHP Code Widget] Breaks when more than one is used with this code….
6 years, 4 months ago
I have added this code to a sidebar using the widget:
<?php $numberOfComments = get_comments_number();
if ($numberOfComments >= 40)
<a rel="nofollow" href="a-url"><img src="a-url" width="160px" alt="alt" /></a>
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?