Forum
Sort Blog posts by Post Type
Is there an ID or something that would allow me to sort blog posts by type? Currently I'm having to make the user select a post type at the beginning of creating a post and then also go to the Meta tab and put it in the appropriate Section. It would be awesome if the post type selection was all that was needed.
I'm confused as to how sorting by type relates to sections - could you give an example?
Sorry, I meant that since I couldn't figure out how how to simply sort by type I'm having the user select a post type, which is the template for the post, but then also go and select a section to put it in, which is how I'm actually sorting them for display on the site.
You can sort on
postTemplate
, which is the post type.Thanks Drew, got that figured out, but I'm having trouble filtering posts for previous/next links within a post. I can't seem to figure out why this code isn't working:
How is it failing?
It seems not to output anything, but I think I found a different solution anyway. Realized the next/previous links really need to be within categories anyway, so I'm filtering by category now and that seems to work fine. Thanks!