Created
June 11, 2010 14:32
-
-
Save anonymous/434539 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Show category? | |
if ($cat_link_string != ''){ | |
$output = '<p><strong>' . $cat_link_string . '</strong></p>'; | |
}else{ | |
$output = ''; | |
} | |
$output .= '<ul class="lcp_catlist">';//For default ul | |
//Posts loop: | |
foreach($catposts as $single): | |
$output .= '<li><img src="' . get_post_meta($single->ID, "image1", true) . '" /><a href="' . get_permalink($single->ID) . '">' . $single->post_title . '</a>'; | |
//Style for date: | |
if($atts['date']=='yes'){ | |
$output.= ' - ' . get_the_time($atts['dateformat'], $single); | |
} | |
//Show author? | |
if($atts['author']=='yes'){ | |
$lcp_userdata = get_userdata($single->post_author); | |
$output.=" - ".$lcp_userdata->display_name; | |
} | |
//Show content? | |
if($atts['content']=='yes' && $single->post_content){ | |
$lcpcontent = apply_filters('the_content', $single->post_content); // added to parse shortcodes | |
$lcpcontent = str_replace(']]>', ']]>', $lcpcontent); // added to parse shortcodes | |
$output.= '<p>' . $lcpcontent . '</p>'; // line tweaked to output filtered content | |
} | |
//Show excerpt? | |
if($atts['excerpt']=='yes' && $single->post_excerpt && !($atts['content']=='yes' && $single->post_content) ){ | |
$output .= '<p>' . $single->post_excerpt . '</p>'; | |
} | |
$output.='</li>'; | |
endforeach; | |
$output.='</ul>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment