akgoze
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
@caimin_nwl Actually I use this code for other taxonomies but i can’t using default plugin categories.
function custom_event_location_tax_archive($query) { if ($query->is_main_query() && !is_admin() && is_tax() && is_tax('event-location') && is_archive()) { $query->set('meta_key','_event_start_date'); $query->set('orderby','meta_value'); $query->set('order','DESC'); } } add_action('pre_get_posts', 'custom_event_location_tax_archive');Actually I use this code for other taxonomies but i can’t using default plugin categories.
function custom_event_location_tax_archive($query) { if ($query->is_main_query() && !is_admin() && is_tax() && is_tax('event-location') && is_archive()) { $query->set('meta_key','_event_start_date'); $query->set('orderby','meta_value'); $query->set('order','DESC'); } } add_action('pre_get_posts', 'custom_event_location_tax_archive');Hi @caimin_nwl,
Yes i switch ascending but doesn’t change anything.
Hi.
I’m using for category pages by custom query. Because i don’t using currently events manager plugin category pages.- This reply was modified 9 years, 3 months ago by akgoze.
Forum: Plugins
In reply to: [Advanced Post List] Display Post Type Name Currently Post ItemThanks.
Viewing 6 replies - 1 through 6 (of 6 total)