I'm trying to output a custom post type but nothing shows up. The code is very simple - what could I be missing?
<?php $favorites = new WP_Query(array('post_type' => 'favorites', 'posts_per_page' => 10)); while ($favorites->have_posts()) : $favorites->the_post(); echo '<li><a href="' . bloginfo('template_directory') . the_post_thumbnail('large') . '" rel="thumbnail" title="<a href=\'' . simple_fields_get_post_value(get_the_id(), array(8, 3), true) . '\'>' . the_title() . '</a>"><img class="rounded" src="' . bloginfo('template_directory') . the_post_thumbnail(array(101,99)) . '" alt="' . the_title() . '" /></a></li>'; endwhile; ?>
What's the best method of displaying a custom post type featured post/page in WordPress?
1:WordPress 3.0.1 Query Custom Post Type with Custom Taxonomy
Have you checked that;. Best place / file to place rewrite_rules_array hookWhat is a good way to set up a dev, staging and production workflow with wordpress
- You have definitely registered a post type called favorites (note plural)
- The browser is not choking on your markup (your HTML is invalid - for starters, you should wrap list items in a
- The function
simple_fields_receive _post_value()exists and is working correctly