Forum
List of blog posts
Hi All
I have just created a new post type called photo.html
and on my blog page i want to display my photo.html in a different style to my default post type
How can i do this using post_in_list.html
Hi All
I have just created a new post type called photo.html
and on my blog page i want to display my photo.html in a different style to my default post type
How can i do this using post_in_list.html
Yes, you can do that by changing the post_in_list.html (or creating your own template in the blog's templates folder).
Then you specify which template by using perch_blog_custom in your page, like so:
For more information, see here: https://docs.grabaperch.com/addons/blog/page-functions/custom/
What if I want one list displaying both post types And a template or each post type
The best way is to probably use <perch:if> to match the type.
So have one template, output two styles:
I've used categories as an example, but you just match the id you want to filter posts by. More information on perch if statements here: https://docs.grabaperch.com/docs/templates/conditionals/if/