• Hi, great job dealing with the update!

    My Problem: I had a loop that worked fine pre 4.2.3.

    [loop type=product field=end_date value=future date_format='Ymd' orderby=end_date order=asc]

    The problem now is that the loop doesn’t return anything. But if I remove orderby=end_date the loop displays all products with that matches the criteria by having a future end_date – but not in the order I intended.

    https://wordpress.org/plugins/custom-content-shortcode/

Viewing 1 replies (of 1 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    I looked in the plugin code, but I don’t see why orderby isn’t sorting by field in your case.

    A couple things you could try:

    1) orderby=field will default to sorting by field name in parameter field, if parameter key isn’t set — this shouldn’t make a difference though..

    2) I read that some people are having difficulty with quotes in shortcode parameters. I haven’t looked into this deeply to see why and how, but you may try changing the order of parameters so date_format is at the end. Again, this shouldn’t make a difference, but at least you could try and rule it out as a possible cause.

    It is a strange issue, because orderby shouldn’t affect what posts are returned, only their order.

Viewing 1 replies (of 1 total)
  • The topic ‘Loop sorted by custom date field’ is closed to new replies.