Home › Forum › Problemi Vari con WP › Trasferimento da wordpress.com a wordpress.org, codici non funzionanti
-
AutorePost
-
-
17 Maggio 2016 alle 10:41 #30857sidney990Partecipante
Salve,
ho appena trasferito il mio “sito” da wordpress.com a wordpress.org acquistando dominio, hosting e mysql da Aruba.
Una volta svolta la procedura di esportazione/importazione ho dovuto modificare manualmente tema ed altre piccolezze; il problema più grande è che ora non mi funzionano i codici che utilizzavo su wordpress.com per visualizzare in homepage gli articoli di 2 categorie e, nella barra laterale, gli articoli di una terza categoria.
I codici che utilizzavo erano i seguenti:
[display-posts category=”offerte” include_excerpt=”true” image_size=”thumbnail” posts_per_page=”3″]
[display-posts category=”usato” include_excerpt=”true” image_size=”thumbnail” include_date=”true” posts_per_page=”6″]
[display-posts category=”Works” include_excerpt=”true” image_size=”thumbnail” posts_per_page=”5″]
Sicuramente è una stupidaggine, ma io non so dove mettermi le mani; qualcuno può aiutarmi?
Grazie mille
-
17 Maggio 2016 alle 10:50 #120478TittiModeratore
WordPress di default non ha nessun shortcode come quelli.
Tu però dovresti sapere a che “plugin” appartengono dato che li usi, e di conseguenza sapere o scoprire se tale codice per wordpress.com è compatibile o ha una sua versione per wordpress.org.
Tra virgolette perché WordPress.com non usa plugin ma funzionalità integrate che potrebbero non aver corrispondenza nei plugin per WordPress.
-
17 Maggio 2016 alle 10:53 #120479sidney990Partecipante
WordPress di default non ha nessun shortcode come quelli.
Tu però dovresti sapere a che plugin appartengono dato che li usi, e di conseguenza sapere o scoprire se tale plugin/codice per wordpress.com è compatibile o ha una sua versione per wordpress.org.
Oddio, non ho la minima idea di quale plugin utilizzasse quei codici… io, una volta creato il sito, li ho aggiunti senza installare alcun plugin ed hanno funzionato da subito.
Come posso modificarli per fare in modo che, ognuno di loro, mi mostri gli ultimi 3, 4 o 6 post di una determinata categoria su wordpress.org?
-
17 Maggio 2016 alle 12:19 #120481TittiModeratore
WordPress.com non usa plugin ma funzionalità integrate che potrebbero non aver corrispondenza nei plugin per WordPress.
Forse non mi sono spiegata. Non è questione di modificare quei codici, quelli o altri non li puoi più usare, dimenticali, WordPress.com e WordPress.org sono due cose completamente diverse… ti sarai ben informato no prima di trasferirti?
Devi quindi cercare un plugin per wordpress.org che faccia quello che vuoi. In alternativa, dovrai effettuare una modifica nel tema o inserire una funzione, dipende da come e dove ti serve e dipende dal tema, ma questo mi pare qualcosa che tu non puoi fare ora, date le domande che fai.
Se non trovi un plugin dovrai quindi prima fare un po’ di pratica e informarti, e comunque creare un child-theme perché tutte le modifiche andranno fatte là¬.
-
17 Maggio 2016 alle 13:40 #120484sidney990Partecipante
Chiedevo, appunto, se eravate a conoscenza di un plugin che faccia la medesima azione; cioè permettermi di inserire in homepage un tot di articoli ripresi da una singola categoria…
-
17 Maggio 2016 alle 13:52 #120486TittiModeratore
Se vuoi gli ultimi, dovrai cercare, con o senza plugin:
Poi, dopo aver stabilito cos’è “un tot” per te (gli ultimi? i primi? a caso? ecc ecc…), farai una ricerca più mirata.
-
17 Maggio 2016 alle 14:21 #120488sidney990Partecipante
ma, ad esempio, online vedo molti che consigliano codici (html credo) per fare determinate azioni, tipo questo:
<?php
$args=array(
'cat' => 3,
'showposts' => 1,
'caller_get_posts' => 1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<p>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></p>
<?php
the_excerpt();
endwhile;
} //if ($my_query)
wp_reset_query(); // Restore global post data stomped by the_post().
?>
Se io lo volessi nella homepage, devo copiarlo ed incollarlo nella pagina statica? Perchè, se cosଠfosse, direi che non funziona... -
18 Maggio 2016 alle 10:32 #120489TittiModeratore
No, è codice PHP e va in un file PHP.
In alternativa, dovrai effettuare una modifica nel tema o inserire una funzione, dipende da come e dove ti serve e dipende dal tema… e comunque creare un child-theme perché tutte le modifiche andranno fatte là¬.
-
18 Maggio 2016 alle 10:39 #120491sidney990Partecipante
Ieri ho seguito un paio di guide sia per creare cartella e file del child theme che per crearne uno in automatico tramite widget ma niente; non riesco a capire come sfruttarlo…
Sono riuscito ad inserire la funzione che serve a me nella sidebar tramite un plugin; peccato che i plugin me li fa inserire solo su footer e sidebar (non nel corpo della homepage come serve a me)…
-
18 Maggio 2016 alle 14:00 #120494wollyAmministratore del forum
come ti è stato già detto è codice php e va in un file php.
functions, un plugin, un template.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.