Ugh .. I've found a flaw in either the developers code or the system that by all intents should work but in reality isn't and I can't figure out why. I've got a vendor listing section to the website and I hired a developer to do the code for me .. and from what I can understand it should work.
I'm sure it used to but I've upgraded to the latest version of CustomPress and I'm fuzzy now wether it did or didn't.
$args = 'vendor_categories='.$cat.'&post_type=vendor_paidlisting&orderby=date&order=DESC&posts_per_page=1';
query_posts( $args );
In the above section of code it should retrieve the latest paid listing that was posted to the category. The problem is .. is that the orderby=date thing isn't working. It's actually pulling up the closest to A within the alphabet.
In this listing http://www.loveinportraits.com/vendor-category/photographers-videographers/ the dummy vendor Sugar High should be the latest vendor listing. However it's showing Cathie Heart Photography as the latest when it isn't, Sugar High is the latest vendor listed .. however Cathie Heart Photography is the closest to A alphabetically.
Now I don't know if this is linked to a back end issue I've spotted about the Date. I created a new custom post type of post and hierarchical.
Please check the screenshots I've included which show that when I view the vendor categories for photographers, it shows all the vendor listings sorted by alphabet .. even when I've asked it to sort by Date!!
Is this back end date sort feature causing the front end display failure?
Why can't I get the latest vendor listing to work?
THIS REQUEST IS URGENT AS MY CLIENT GOES LIVE IN 48 HOURS!