Display Parent-Child Posts in specific order by comparing IDs in array

I think you’ll just need to loop the loop and first build a helper array to contain the hierarchy, then work with that to print out any necessary html. Caching the resulting helper array to a transient might be a good idea to save processing time. // is there a transient? $transient = get_transient( “parent_children_ids_{$post_id}” … Read more