Originariamente inviata da BMuff prova così codice: <?php //$id_corrente = get_the_ID(); $custom_fields = get_post_custom(); $my_custom_field = $custom_fields['relazione']; $args = array( 'post_type' => 'realizzazioni', 'posts_per_page' => 10, //'post__not_in' => array ( $id_corrente ), 'meta_query' => array( array( 'key' => 'relazione', 'value' => $my_custom_field ))); query_posts($args); ?> ottimo, grazie! Avevo risolto levando gli apici, ma questo va benissimo lo stesso.
<?php //$id_corrente = get_the_ID(); $custom_fields = get_post_custom(); $my_custom_field = $custom_fields['relazione']; $args = array( 'post_type' => 'realizzazioni', 'posts_per_page' => 10, //'post__not_in' => array ( $id_corrente ), 'meta_query' => array( array( 'key' => 'relazione', 'value' => $my_custom_field ))); query_posts($args); ?>
Regole del Forum