Visualizzazione 1 filone di risposte
Visualizzazione 1 filone di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Problemi Vari con WP › Problema con query_posts
Ho un grosso problema con query_posts.
Devo fare un sito di notizie utilizzando wordpress e mi hanno chiesto di mettere le prime 20 notizie italiane e poi in fondo alla pagina 3 notizie, incolonnate, dall’estero. Ho quindi creato due categorie (una per le italiane, una per le straniere) e lavorato con query_posts. Il codice mi sembra sinceramente corretto ma c’è qualcosa che non va. Il secondo loop, quello con le notizie straniere, invece di mostrarmi le notizie di quella categoria, mi mostra la più vecchia notizia della categoria delle notizie italiane.
Ho messo il codice su pastebin. Sto lavorando con la 2.7. Come potete vedere c’è il plugin excerpt_reloaded. Ho provato a mettere the_excerpt(); normale e non cambia nulla. La variabile $i mi serve per dare al primo post un aspetto diverso dagli altri. Devo finire entro lunedଠil sito. Il grosso è fatto, mi mancano poche cose. Qualcuno riesce a dirmi dove sbaglio, se sbaglio, gliene sarei grato.
probabilmente il secondo dei due Loop viene ignorato. Hai letto qui?
http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_1 (anche l’esempio 2)
vedi anche il paragrafo Multiple Loops in Action
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0