Home Forums General Issues Category Query Reply To: Category Query

  • To be honest I really have never done a var_dump before. I’ve looked into it and tried a few things but can’t seem to get it to work the way it needs to. It just dumps out a bunch of data I can read but not make much sense of. Then below it spits out the content in DESC order.

    This is my var_dump. I know it’s not right but I don’t know how to get it to where I need it and I’m not even sure it’s placed properly in the template. I’ve placed it just inside the custom loop function and before the query args:

    $myVar = get_posts();
    var_dump ($myVar); 

    If it helps, some background…. I have a page called “Executive” and a custom category template to display it. The template displays content from a regular post category called “Executive”. The posts’ content is created using 3 ACF fields. All of the content displays fine when the default DESC order is used but when I switch it to ASC order, it fails and no post content is displayed (global header, footer etc display fine). The reason I need ASC order is because the content doesn’t follow any alphabetical or other priority order, just the date each post was input. Yes, I could re-enter all the posts in backwards sequence and use DESC order but what’s the fun in that? 🙂