Home › Forum › Problemi Vari con WP › usare i tag condizionali per 2 pagine distinte
-
AutorePost
-
-
6 Luglio 2009 alle 16:47 #10942gabar-elPartecipante
ciao, ho la necessità di utilizzare i tag condizionali per due pagine diverse. Nella pagina page.php ho quindi implementato un else if, ma non riesco a saltarci fuori, come bisogna implementare la cosa affinchè funzioni in modo corretto?
grazie
-
6 Luglio 2009 alle 18:47 #66920SteveAglAmministratore del forum
Speiga quel che vuoi fare e forse potremo dare una risposta..
-
6 Luglio 2009 alle 19:07 #66923swarroPartecipante
grazie per il suggerimento, ma ho provato e non fa proprio quello che vorrei, o sono io che ho sbagliato qualcosa?!?
io vorrei che se nel mio post scrivo la parola “wordpress” e questa è già presente tra i miei tag, “WordPress”(all’interno dell’articolo) diventi un link tipo
http://www.miosito.com/tag/wordpress/
in modo che se qualcuno clicca sul link si visualizzano tutti gli articoli contenenti quel tag
grazie
-
6 Luglio 2009 alle 19:27 #66924SteveAglAmministratore del forum
Hai sbagliato discussione.. in ogni caso la prima opzione nella sezione Auto Link del plugin simple tags fa proprio quello che chiedi!
-
7 Luglio 2009 alle 11:57 #66936gabar-elPartecipante
tramite tag condizionali devo implementare 2 pagine una diversa dall’altra e mi chiedo come farlo visto che il codice qui sotto non funziona…
grazie
<?php
if (is_page('prima_pagina'))
{
?>
codice prima pagina
<?php
}
else if (is_page('seconda_pagina'))
{
?>
codice seconda pagina
<?php
}
else
{
?>
codice tutte le altre pagine
<?php
}
?>
codice rimanente valido per tutte le pagine (tipo footer)
-
7 Luglio 2009 alle 12:11 #66938SteveAglAmministratore del forum
usi l’id di pagina il suo nome la sua abbreviazione cosa?
-
7 Luglio 2009 alle 15:14 #66940gabar-elPartecipante
uso il suo nome
-
7 Luglio 2009 alle 15:21 #66941SteveAglAmministratore del forum
Sicuro sia corretto? Prova con gli ID
-
8 Luglio 2009 alle 7:22 #66949gabar-elPartecipante
con una pagina sola funziona, mi rimane il dubbio del codice.
nel caso volessi provare come devo implementare gli id?
grazie
-
8 Luglio 2009 alle 7:29 #66950SteveAglAmministratore del forum
Cosa vuol dire come devo implementare gli ID il codice che indichi dovrebbe essere corretto, è uguale all’esempio del codex
-
9 Luglio 2009 alle 20:31 #66968gabar-elPartecipante
mmmhhh… credo di non avere capito…
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.