[Plugin: Posts 2 Posts] Loop on loop – taxonomy template
-
Hi,
I’m looking for a little bit of help… ??
My objectif is to show connected posts to a custom post filtering on meta query (custom field).
Here is the initial code : https://pastebin.com/Thhe6EbR
The problem stars on line 33. Multiple data are displayed. I need to show just one data. I already do this on single custom post but the same code do not work on a taxonomy page.
I’m using this piece of code just after line 30 :
$connected = new WP_Query( array(
'connected_type' => 'saisons_to_sejours',
'connected_items' => get_queried_object_id(),
'nopaging' => true,
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'date_debut',
'value' => $today,
'compare' => '<='
),
array(
'key' => 'date_fin',
'compare' => '>=',
'value' => $today,),
)) );
Not sure I’m clear in my explanations…
- The topic ‘[Plugin: Posts 2 Posts] Loop on loop – taxonomy template’ is closed to new replies.