Tag Info

Hot answers tagged


Always great if someone wants to use better, more correct and more efficient ways to get things done. To achieve what you need is not difficult. WORKSFLOW: Use the usort() to create your custom sort order Use the the_posts filter to sort and return the sorted array of posts just before the loop is executed Inside the loop, all you need to do is to ...


If I understand the question correctly, you want to produce something like this: Sub-Item 1 Post 1 Post 2 [...] Sub Item 2 Post 1 Post 2 [...] There may be a more efficient way than what I am about to tell you, but I would try something like this: First create an array to hold your sorted posts. $sortedPosts = array(); Next, create an array for ...

Only top voted, non community-wiki answers of a minimum length are eligible