Split List by Post Type
-
I used a code from before to display my favorites.
I replaced:
query_posts(array('post__in' => $favorite_post_ids, 'posts_per_page'=> $post_per_page, 'orderby' => 'post__in', 'paged' => $page)); while ( have_posts() ) : the_post(); echo "<li><a href='".get_permalink()."' title='". get_the_title() ."'>" . get_the_title() . "</a> "; wpfp_remove_favorite_link(get_the_ID()); echo "</li>"; endwhile;With:
foreach ($favorite_post_ids as $post_id) { $p = get_post($post_id); echo "<li>"; echo "<a href='".get_permalink($post_id)."' title='". $p->post_title ."'>" . $p->post_title . "</a> "; wpfp_remove_favorite_link($post_id); echo "</li>"; }But my question is, I want to separate the lists by different Custom Post Types…so how can I make this code only show favorites from one specific post type.
Then I figure I would duplicate it over again for the other Custom Post Types.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Split List by Post Type’ is closed to new replies.