Home › Forum › Problemi Vari con WP › Category_name in WP 3.1, che fine ha fatto?
-
AutorePost
-
-
24 Febbraio 2011 alle 10:19 #16898FraniusPartecipante
Ciao a tutti.
Ho appena fatto l’upgrade a Wp 3.1 e mi sono accorto che tutte le query sul mio sito http://www.universalcentury.it che prevedono nel $args = array( un ‘category_name’ => ‘quellochetipare’ semplicemente non funzionano (o funzioanno male visto che viene ignorata la condizione ‘category_name’).
Idee?
-
24 Febbraio 2011 alle 10:28 #81638MassimoDAlmaPartecipante
Diamine, confermo.
-
24 Febbraio 2011 alle 10:31 #81640FraniusPartecipante
Disattivando Simple tags, la cosa migliora, ma non si risolve del tutto…
-
24 Febbraio 2011 alle 10:46 #81642FraniusPartecipante
Dunque…
Premesso che bisogna disattivare simple tag, ho scoperto che:
funzionano le query se tra le condizioni c’e’ un solo tag (magari anche seguito da tag_not_in)
ad es: http://www.universalcentury.it/characters/chara-fazioni/titans-chara
NON funzionano le query che prevedeono 2 o piu’ tag
ad es: http://www.universalcentury.it/anime/zeta-gundam/zeta-personaggi
il tutto sempre incrociato con una category_name, ovviamente.
-
24 Febbraio 2011 alle 11:00 #81645FraniusPartecipante
Sono tornato a WP 3.0.5…
Ho visto sul forum inglese che parecchia hanno avuto lo stesso problema.
Aspetterò prima di (ri)fare l’upgrade…
-
24 Febbraio 2011 alle 11:07 #81647MassimoDAlmaPartecipante
Bah, per il momento disattivando simple tags sembra funzionare. Vedremo poi…
-
24 Febbraio 2011 alle 11:11 #81648wollyAmministratore del forum
metto questo 3d in evidenza, in attesa di soluzione definitiva, il primo che la trova la posti qui.
-
24 Febbraio 2011 alle 11:15 #81649MassimoDAlmaPartecipante
Dal forum inglese questa soluzione:
Simple tags attivo, togli il flag a “Active tags for page” e tutto funziona.
Provato, sembra funzionare
-
24 Febbraio 2011 alle 13:13 #81658FraniusPartecipante
Peccato che io abbia delle query che tirano fuori l’excerpt di N pagine in base al loro TAG…
-
24 Febbraio 2011 alle 13:29 #81660SteveAglAmministratore del forum
http://ottopress.com/2010/wordpress-3-1-advanced-taxonomy-queries/
qui si può trovare una soluzione su come cambiare le query
-
24 Febbraio 2011 alle 15:39 #81669MassimoDAlmaPartecipante
comprendo, anzi, rivedendo avevo già pensato che per chi ha query sulle pagine non andasse bene. Io ho una struttura semplice, e per ora m’accontento.
-
24 Febbraio 2011 alle 20:55 #81677valbrembanaPartecipante
Dal forum inglese questa soluzione:
Simple tags attivo, togli il flag a “Active tags for page” e tutto funziona.
Provato, sembra funzionare
Dopo aver aggiornato alla 3.1 anche io ho avuto questo problema, non riconosceva le mie tante categie, trovando questo post in rete ho risolto alla grande.!!!
GRAZIE TANTE..
-
26 Febbraio 2011 alle 8:33 #81706zhenyaPartecipante
Di Simple Tags era già disponibile qualcosa, ora han creato, a disposizione per l’aggiornamento automatico, una beta che risolve queste problematiche.
-
26 Febbraio 2011 alle 12:34 #81714MassimoDAlmaPartecipante
Confermo, appena installata.
Sembra funzionare, ma va verificata come funzionalità , che cambia tutto.
Disponibile qui http://wordpress.org/extend/plugins/simple-tags/
-
28 Febbraio 2011 alle 10:04 #81742FraniusPartecipante
Dopo un po’ di esperimenti ho scoperto che:
Non funzionano le query che incrociano 2 o più TAG.
Ho cancellato dal server tutti i plugin (tranne exec-php) e messo Twenty Ten come tema.
As es. qui: http://www.gundam-uc.info/anime/ms-igloo-2/igloo2-personaggi
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#b0b0ce">
<tbody>
<?php
global $post;
$rowcnt = 0;
$rowitems = 4; // Numero di celle per riga
$args = array(
'numberposts' => -1, // Numero di post per pagina, -1 = infiniti
'post_status' => null,
// 'category_name' => 'characters',
'tag' => 'ms-igloo2-se eff-fa',
// 'meta_key' => 'Object type',
// 'meta_value' => 'Character',
'orderby' => 'date',
'order' => 'ASC',
);
$myposts = get_posts($args);
foreach($myposts as $post) :
if (++$rowcnt == 1) {
echo "<tr align='center'>";
}
?>
<td><?php the_excerpt(); ?></td>
<?php
if ($rowcnt == $rowitems) {
$rowcnt = 0;
echo "</tr>";
}
endforeach;
if ($rowcnt == 0) {
echo "</tr>";
}
?>
</tbody>
</table>
<?php
//Reset Query
wp_reset_query();
?>
Indipendentemente dal fatto che usi la CAT o la Meta_key, se lascio i 2 tag non otttengo risultati.
-
2 Marzo 2011 alle 10:39 #81791FraniusPartecipante
Ok, ho risolto l’arcano.
Bisonga mettere il segno + tra i due (o piu’) tag!
-
6 Marzo 2011 alle 18:15 #81990jackalopePartecipante
salve a tutti
ho provato ad installare simple tags e disabilitare tag for page ma non è cambiato nulla
aprendo una categoria mi dice:
Sorry, but there aren’t any posts in the News category yet.
qualcuno con questo problema ha risolto?
grazie
ciao
EDIT:
Falso allarme x fortuna…il plugin che usavo per indicare quali categorie rendere visibili nella homepage era falese con la nuova 3.1
disattivandolo è tornato tutto alla normalità
il plugin era Category Visibility-iPeat Rev
ora ho installato Opt-In che permette di visualizzare le categorie news e blog (preimpostate) nella home
grazie
saluti
-
4 Agosto 2011 alle 10:52 #87189mitchPartecipante
…ehm chiedo venia per l’intromissione, ma visto che l’argomento è affine ne approfitto, giusto una cosetta: non posso riferirmi alle categorie usando l’id anzichè il nome? Devo listare i posts di una categoria nella sidebar, ho usato il codice:
<?php query_posts('cat_ID=3'); ?>
- <?php the_title(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php endwhile; ?>
<?php endif; ?>
Penserò in un secondo momento come linkare i titoli ai relativi posts, ad ogni modo con
cat_ID=3
non identifica la singola categoria ma mi lista i posts di tutte… qualche dritta?
EDIT: risolto!!! ho trovato la soluzione (dopo giorni di affanno) tanto epr cambiare nel grandioso wiki!
Nello specifico su http://www.wpitaly.it/wiki/Main/QueryPosts
riferirsi alla categoria lo si fa ‘cat=3’ non ‘cat_ID=3’ (!!!)
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.