http://pixline.net/wordpress-plugins/category-page-wordpress-plugin/en/
Here was the original function:
Code:
function page2cat_content_catlist($content){ global $post; if ( stristr( $content, '[catlist' )) { $search = "@(?:<p>)*\s*\[catlist\s*=\s*(\w+|^\+)\]\s*(?:</p>)*@i"; if (preg_match_all($search, $content, $matches)) { if (is_array($matches)) { $title = get_option('p2c_catlist_title'); if($title != "") $output = "<h4>".$title."</h4>"; else $output = ""; $output .= "<ul class='p2c_catlist'>"; $limit = get_option('p2c_catlist_limit'); foreach ($matches[1] as $key =>$v0) { $catposts = get_posts('category='.$v0."&numberposts=".$limit); foreach($catposts as $single): $output .= "<li><a href='".get_permalink($single->ID)."'>".$single->post_title."</a></li>"; endforeach; $search = $matches[0][$key]; $replace= $output; $content= str_replace ($search, $replace, $content); } $output .= "</ul>"; } } } return $content; }
Code:
foreach($catposts as $single): $output .= "<li><a href='".get_permalink($single->ID)."'>".$single->post_title."</a></li>"; endforeach;
Code:
foreach($catposts as $single): $excerpt = $single->post_content; $output .= "<li><a href='".get_permalink($single->ID)."'>".$single->post_title."</a></li><p>".$excerpt."</p>"; endforeach;