One way I can think of would be using WP_Query. Create one query for the events and the other for the articles/posts.
Thread Starter
Mirek2
(@mirek2)
I should mention that I want the articles to appear among the events. (For example, say one event takes place on Jan. 5, another on Jan. 7, but both events were created on Jan. 2. If I create an article on Jan. 6, I want it to appear in between the two events.)
Is that possible with WP_Query?
Not entirely. You’ll need to filter ‘posts_orderby’ to insert a complex orderby clause. WP_Query should form the remainder of your query just fine though.
I’m unsure of what that complex clause would be, or if it’s even possible. Some sort of sub-query that returns one date or the other depending on the post type or whatever distinguishes articles from events.
If that doesn’t work, you could sort the returned array with PHP and usort().