Loop Builder, sort by Advanced Custom Field?
Hi,
I am using the BeTheme Loop Builder, I am aggregating posts of a certain category.
I now need to apply "order by menu order", but as I also use advanced custom fields plugin, it seems, as if this doesn´t work.
Wordpress custom fields do not show up, if advanced custom fields plugin is installed.
Actually, I would need to sort by an advanced custom field which the field name "zeitraum-von", the date format is d.m.Y
As it is probably not possible to sort by that field, I thought about introducing a Wordpress Custom field "menu_order", which I could fill with numbers (eg. 20250423). I guess, then I could use "order by menu order". But, I Wordpress custom fields are not available once Advanced Custom Fields plugin is active.
Do you have an idea?
Thx in advance
Markus
Comments
Hi,
Do you prefer to post-type Posts (blog) or something else?
I am asking because Posts do not have menu order (with or without ACF).
I also checked that with Portfolio, and the order did not disappear with ACF active.
Best regards
Posts do have menu order, but by default you don´t see it in the backend as it seems. There are plugins with which you could manipulate the order of posts.
By default you also don´t see the Wordpress custom fields, you have to actively check a box so that they are shown. But if Advanced Custom Fields plugin is active, this checkbox is hidden.
But what I learnd after some research: the actual setting for ordering posts happens in the order_menu column in the wp_posts table. So this is the place, where Betheme's Order by: "Menu order" gets its directives.
Regarding my issue, I was able to solve this with a little programming in functions.php of the child theme.
I am happy to see that you handled it.
Please let me know if you have problems with anything else.
Best regards