Tag Archives: post type

Custom WordPress Post Type related posts and tutorials.

Styling different post types within the same loop in WordPress

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