Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_post_by_cat($cat_name,$orderby,$order)
- {
- printf("<div class='post_box'>");
- $list = query_posts('category_name='.$cat_name.'&orderby='.$orderby.'&order='.$order);
- //$list = query_posts( array( 'category__and' => array(3,19), 'posts_per_page' => 5, 'orderby' => 'title', 'order' => 'DESC' ) );
- printf("%d Beiträge die aus der Kategorie %s gefunden wurden.",count($list->posts),$cat_name);
- for($i=0;$i<count($list);$i++)
- { echo "<br>".get_the_post_thumbnail( $list[$i]->ID, 'thumbnail' );
- printf("<post_title> <a href='%s'>%s </a><info>%s</info> </post_title>",
- $list[$i]->guid,$list[$i]->post_name,$list[$i]->post_content);
- }
- printf("</div>");
- }
Advertisement
Add Comment
Please, Sign In to add comment