Pastoid

The page you are looking at now is at this URL: http://pastoid.com/a7u

This paste was last updated on July 17, 2009 at 12:40 am.

Pasted Coderaw

<?php
 
						//Gets category info
						global $wp_query;
						$cats = get_the_category();
						$tempQuery = $wp_query;
						$currentId = $post->ID;
 
						// related category posts
						$catlist = "";
						forEach( $cats as $c ) {
						if( $catlist != "" ) { $catlist .= ","; }
						$catlist .= $c->cat_ID;
						}
						$newQuery = "cat=" . $catlist;
						query_posts( $newQuery );
						$categoryPosts = "";
						$count = 0;
						if (have_posts()) {
						while (have_posts()) {
						the_post();
						if( $count<4 && $currentId!=$post->ID) {
						$count++;
						$topic=get_post_custom_values("_video_description");
						$link= get_permalink();
						$categoryPosts .= '
						 <li><h2><a href="'.$link.'">' . $topic[0] .'</h2><h3>'. the_title( "", "", false ).'</h3></a> </li>';
						}
						}
						}
						$wp_query = $tempQuery;
						?>
 
						<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
 
						    <ul id="relatedposts"><?php echo $categoryPosts; ?></ul>
						<?php endwhile;?>

Toggle wordwrap

Referring DomainHits
Unknown Referer 126
www.bing.com 6
Is this paste spam?
<Hide