Hi,
I am trying to sort by date but it doesn't work.
Here is my page : hidden link
Hello,
Thanks for the details, I can log into your website.
I assume we are talking about this post view "CONSEILLERS - vue liste lots":
hidden link
And in section "Loop Editor", the custom date field:
[types field='date-de-livraison' style='text' format='j F Y' item="@programme-lot.parent"][/types]
If it is, above post view is querying posts of post type "lots", but the custom field "date-de-livraison" is in another post type "programme", so it is expected result that order by this custom date field won't work.
Views plugin is using WordPress class WP_Query to query posts, according to wordpress document:
https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
'meta_value' - Note that a 'meta_key=keyname' must also be present in the query.
If you are going to order the result by a custom field, that custom field must be setup in the same custom post type "lots".
Oh, i have changed the field [types field='date-de-livraison' style='text' format='j F Y'][/types]
Because the field is not a parent field, but what i see is an other problem, when a add a child i fill this field and i just see it was empty on all children type.
However, you can see on the form it could do fill : hidden link
Is the original question of this thread resolved?
https://toolset.com/forums/topic/problem-with-sort-by-date/#post-1245670
I am trying to sort by date but it doesn't work.
Please confirm it, thanks
For the new question, I have tried the URL you mentioned above:
hidden link
I can see the custom date field "Date de Livraison" is populated with value "31 décembre 2021", see screenshot:
saisie-ajout-lot.JPG
Please start a new thread for the new questions, describe detail steps to duplicate the same problem:
when a add a child i fill this field and i just see it was empty on all children type.
My issue is resolved now. Thank you!