This function is an expansion on an earlier post, Styling different post types within the same loop in WordPress. It follows a similar conventions of get_template_part. A recent addition in WordPress and explained in the previously mentioned post. Continue reading WordPress theme templating function for custom post types and formats
Originally posted on the GuRuStu Group Blog ( post link )
Now that WordPress has finished up the internal API for custom post types we can begin taking advantage of all the cool new ways one can organize content within it.
To learn more about custom post types check out Justin Tadlock’s great custom post type article.
During a recent company project I had to work out how to output unique HTML for different post types in the search results. The solution was surprisingly easy thanks to the new template function get_template_part(). This technique can also be transferred to the main loop if you are going output different post types together. In the case of search results, if you set your new post type as search-able it will show up together with your posts and pages. Continue reading Styling different post types within the same loop in WordPress