i’m having this points for month and i can not determine how one can clear up this one:
I’m engaged on an internet site, the place you may try cultural occasions in my area. That is simply to let you understand of what i am speaking about usually .
mox-veranstaltungen.de
Now for the backend i’ve made a customized question to output an inventory of occasions by a given vary of dates. These dates are literally the eventdates. (when these occasions happen) There are a number of occasions on one particular day.
$args = array(
'post_type' => 'occasions',
'numberposts' => 20,
'meta_key' => 'date',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'date',
'worth' => array ($von,$bis),
'evaluate' => 'BETWEEN',
'sort' => 'NUMERIC',
),
)
the date worth is made with ACF and sorting on dates simply works wonderful.
Now each occasion has additionally a taxonomy time period of a taxonomy i known as ‘eventtype’. I must kind occasions of a particular date to those taxonomy phrases.
For instance:
- all occasions occur on the 4th of july
- All occasions with the taxonomy time period ‘music’
- All occasions with the taxonomy time period ‘performs’
- All occasions with the taxonomy time period ‘gala’s’
- …
I do not know how one can clear up this. I’ve prolonged the question above with this tax_query assertion, which clearly is just not working:
$allGenres = get_terms( array('taxonomy' => 'eventtype','fields' =>'ids','hide_empty' => false));
$args = array(
'post_type' => 'occasions',
'numberposts' => 20,
'meta_key' => 'date',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'date',
'worth' => array ($von,$bis),
'evaluate' => 'BETWEEN',
'sort' => 'NUMERIC',
),
),
'tax_query' => array (
array(
'taxonomy' => 'eventtype', //taxonomy
'discipline' => 'term_id',
'phrases' => $allGenres //
'orderby' => array ('phrases' => 'ASC')
)
));
This orderby assertion is only a shot in the dead of night, just a few filthy code googling 🙂
How i’m fixing this? I can think about it is only a fairly simple job, proper?
I’m not a programmer however indirectly