WordPress.org

Ready to get started?Download WordPress

Forums

Page never stops loading (widget problem) (6 posts)

  1. revolutionfrance
    Member
    Posted 4 years ago #

    Hello, here is the code for the widget that makes the page never stop loading. I validated the page in xhtml strict but can't seem to find the cause for the loading. If someone could help that would be great!!

    global $wpdb;
    
    		/* Before widget (defined by themes). */
    		echo $before_widget;
    
    		/* Display the widget title if one was input (before and after defined by themes). */
    		if ( $title )
    			echo $before_title . $title . $after_title;
    
    				echo '<div class="poppostcom">';
    				echo '<ul>';
    
    				$result = $wpdb->get_results("SELECT comment_count,id,post_title FROM " . $wpdb->posts . " ORDER BY comment_count DESC LIMIT 0 , 5");
    				foreach ($result as $post) {
    				setup_postdata($post);
    				$postid = $post->id;
    				$title2 = $post->post_title;
    				$commentcount = $post->comment_count;
    				$titlelim = substr($title2,0,25);
    				if ($commentcount != 0) { 
    
    				echo '<li>';
    
    				$image = get_post_meta($post->id, 'bigphoto', true); /* Replace lead_image with the name of the custom field for the image you want to use */
    				echo '<div class="popimgs">';
    
    				echo '<img alt="" src="http://hockleys.org/wp-content/themes/norwegiangrunge/timthumb/timthumb.php?src='.$image.'&h=30&w=30&zc=1" />';
    				echo '</div>';
    				echo '<p><a href="'.get_permalink($postid).'" title="'.$title2.'">';
    				if (strlen($title2) > 25 ) { echo ''.$titlelim.' &hellip;';
    				 } else { echo ''.$title2.''; }
    
    				echo '</a>'; echo" {";
    				echo ''.$commentcount.''; echo"}"; echo '</p>';						
    
    				echo '</li>';
    
    				 } } ;
    
    				echo '</ul>';
    				echo '</div>';
  2. revolutionfrance
    Member
    Posted 4 years ago #

    Anyone? This is really bothering me, I cannot find the answer anywhere...

  3. revolutionfrance
    Member
    Posted 4 years ago #

    I can add that it only happens in firefox (3.5.4)

  4. revolutionfrance
    Member
    Posted 4 years ago #

    Can't anybody help me?

  5. revolutionfrance
    Member
    Posted 4 years ago #

    Sorry for being persistent, but still bugging me...

  6. revolutionfrance
    Member
    Posted 4 years ago #

    Isn't there anyone out there to help? :-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.