Visualizzazione 3 filoni di risposte
Visualizzazione 3 filoni di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Problemi Vari con WP › query su tag che non ne vuole sapere
ciao ragazzi,
sto cercando di fare una query con 2 o + tag imposti dove tutti devono essere presenti per tirare fuori il posto
?php
// The Query
$tag1 = paperino;
$tag2 = pluto;
query_posts('tag='.$tag1.'+'.$tag2);
// The Loop
while ( have_posts() ) : the_post();
echo '
the_title();
echo '
';
endwhile;
// Reset Query
wp_reset_query();
?>
non riesco a farlo funzionare in nessun modo... singolarmente funzionano, ma se sommo i due tag nulla... me li stampa tutti... dove sbaglio?
Che se la sintassi prevede:
‘tag=bread+baking+recipe’
nel tuo caso mancano le virgolette che racchiudono i paramentri…
Vedo ora che hai fatto due volte la stessa domanda a distanza di 1 ora, avessi visto prima NON avrei dato alcuna risposta… se non hai pazienza di aspettare le risposte io non ne ho per perder tempo a cancellarle… avvisata/o la prossima volta le chiudo/cancello e scatta il ban.
Non ho inserito il post due volte perchè avevo fretta ma semplicemente perchè non sono riuscita a modificarlo dopo che ho visto che l’editor aveva cambiato il codice alcune cose… ho utilizzato nella seconda il marcatore code ma non è servito a molto. Tutto qui.
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0