Home › Forum › Plugin e temi di WP › Post Futuri
-
AutorePost
-
-
14 Luglio 2005 alle 14:41 #286FRANTOPartecipante
vorrei scrivere dei post con data futura ma devono essere visualizzati immediatamente! come si può fare?
nota vedere
http://www.emergencybrianza.it
e calendario!
-
14 Luglio 2005 alle 15:10 #33520SteveAglAmministratore del forum
mi sa che sul sito han messo il titolo con la data futura, se vedi la data di pubblicazione del post “17 Luglio – Inverigo” è quella di oggi, non il 17.
Quindi la risposta alla tua domanda:
vorrei scrivere dei post con data futura ma devono essere visualizzati immediatamente! come si può fare?
è: non si può fare!
-
14 Luglio 2005 alle 15:21 #33521FRANTOPartecipante
si mi sono spiegato male io:
vorrei scrivere dei post con data futura ma devono essere visualizzati immediatamente!
per ottenere 2 risultati:
ordinarli con la data che imposto
sul calendario venga linkato il giorno in cui si svolge la manifestazione non il giorno in cui viene aggiunto il post!
-
14 Luglio 2005 alle 16:07 #33522FRANTOPartecipante
ci ho lavorato un po, la cosa si risolve abbastanza semplicemnte cosi:
per far si che wordpress visulizza i post con data futura
nel file
wp-includesclasses.php
alla riga 492
sostituire
$now = gmdate('Y-m-d H:i:59');
con
//modifica fatta da franto, in questo modo visulizza ttui i post, anche quelli futuri!!!!
//$now = gmdate('Y-m-d H:i:59');
$now = '9999-01-01 00:00:00';
per far si che il calendario linki anche i post futuri
nel file
wp-includestemplate-functions-general.php
alla riga 479 sostituire
// Get days with posts
$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE MONTH(post_date) = $thismonth
AND YEAR(post_date) = $thisyear
AND post_status = 'publish'
AND post_date < '" . current_time('mysql') . ''', ARRAY_N);
con
// Get days with posts
$dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb->posts WHERE MONTH(post_date) = $thismonth
AND YEAR(post_date) = $thisyear
AND post_status = 'publish' "
//riga semi asteriscata da franto per visulizzare tutti i link, anche quelli dei post futuri, del mese!
/* AND post_date < '" . current_time('mysql') */, ARRAY_N);
per maggiori info franto [chioggiola] gmail [punto] com!!!
inserisco questo hack nel wiki?
-
14 Luglio 2005 alle 17:15 #33523SteveAglAmministratore del forum
> inserisco questo hack nel wiki?
la modifica è interessante… certo che puoi inserirlo come hack, ma il problema con gli hack è che poi quando vai ad aggiornare WP ad una versione più nuova, o ti ricordi delle modifiche che hai fatto e in quel caso sei costretto a rifarle daccapo (perché non sai se i file ‘classes.php’ e ‘template-functions.-general.php’ sono stati modificati dagli sviluppatori) oppure ti dimentichi dell’hack e sovrascrivi i file e perdi la funzione modificata.
Cmq bravo.
-
25 Settembre 2007 alle 21:38 #46874oviPartecipante
Ma che pazzo … bravo bravo!
-
13 Maggio 2008 alle 11:21 #53598Slavich84Partecipante
grande! mi hai risolto un problemone!
-
-
AutorePost
- Il topic ‘Post Futuri’ è chiuso a nuove risposte.