Php HELP!

sargon30

Nuovo Utente
7 Giu 2014
16
0
0
wordpress php

Ciao a tutti
ho regione, provincia, comune
C'è uno script che mi possa aiutare a richiamare dinamicamente questi dati?

Help!!!
 
php wordpress helpp!!

dove stà l'errore???? deve funzionare in wordpres... ormai ho perso ogni speranza...

PHP:
<?php
global $post;
$args = array(
	'post_type' => 'post',
	'tax_query' => array(
		'relation' => 'AND',
		array(
			'taxonomy' => 'regione',
			'field' => 'slug',
			
		),
		array(
			'taxonomy' => 'provincia',
			'field' => 'id',
			'operator' => 'NOT IN'
		),
array(
			'taxonomy' => 'comune',
			'field' => 'id',
			'operator' => 'NOT IN'
		)

	)
);
$query = new WP_Query( $args );

echo '<ul>';

$myposts = get_posts( $args );
foreach ( $myposts as $post ) : 
  setup_postdata( $post ); ?>
	<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach;
wp_reset_postdata(); ?>
</ul>
 

Discussioni simili