Hi. I have different Custom Post Types. For example ‘Videos’, ‘Recipes’ and ‘Events’.
On the Homepage i can display all posts from all Custom Post Types, which i can do using the following (only the opening of the loop shown):
<?php query_posts( array( 'post_type' => array( 'videos', 'recipes', 'events', ), 'paged' => $paged ) // for paging links to work ); if (have_posts()) : while (have_posts()) : the_post(); ?>
Now for what i want to do:
I would like to display each Custom Post Type’s post in a different style and layout/structure. So the HTML output is different and also the CSS is different.
For an illustrated demonstration, please check the following image which should hopefully make it very clear:
- The topic ‘Style and Structure Posts Differently on Homepage based on Custom Post Type’ is closed to new replies.