Risposte nei forum create
-
AutorePost
-
26 Luglio 2008 alle 9:52 in risposta a: Impostare come Base delle Categorie la Root. Controindicazioni? #56312TheSneezerPartecipante
Una cosa che ho notato è che usando
Base delle categorie: /.
in Firefox e IE7 è tutto ok, quindi vedo http://www.sito.it/nomecategoria/ mentre in IE6 l'url diventa http://www.sito.it/./nomecategoria/
TheSneezerPartecipanteora mi chiedo, dove devo guardare com’è encodato?
Vai in Impostazioni > Lettura > Codifica delle pagine e dei feed
TheSneezerPartecipanteGrazie mille Arturo!
Ora funziona tutto …
Ciao
TheSneezerPartecipanteGrazie mille a entrambi!! Ho risolto il mio problema personalizzando il codice postato da Arturo qui:
TheSneezerPartecipanteciao ondapi,
ho letto quel topic, e ho utilizzato il codice che hai suggerito.
Nel codice che ho inserito sopra non viene visualizzata correttamente l’utima riga, che sarebbe invece:
echo "". $records['post_title'] ."<br>";
Non riesco a farlo visualizzare correttamente, guarda nel codice html di questa pagina per vederlo …
Per il primo problema ho già risolto unsando
post_status = 'publish'
mentre per il secondo, cioè quello di linkare l'url riscritto, come si potrebbe fare?
TheSneezerPartecipantegrazie, ho trovato i post che parlavano dell’argomento e sono riuscito ad implementare la cosa utilizzando questo codice:
<?php
$db= @mysql_connect('localhost','utente','password');
mysql_select_db('nomedatabase' , $db);
$con = mysql_connect("localhost","utente","password");
$sel_db = mysql_select_db("nomedatabase", $con);
$result = mysql_query("select * FROM wp_posts WHERE post_type ='post' ORDER BY id desc limit 10 " ,$db);
while ($records = mysql_fetch_assoc($result)) {
echo "". $records ."<br>";
}
?>
L'unico problema è che vengono inseriti anche le bozze di post e i post programmati ma non ancora pubblicati. Come si può modificare il codice?
Inoltre è possibile linkare direttamente l'url riscritto (http://localhost/wpblog/titolo-del-post/) invece di http://localhost/wpblog/index.php?p=id?
-
AutorePost