Home › Forum › Problemi Vari con WP › CHILD THEME con personalizzazioni
-
AutorePost
-
-
15 Agosto 2013 alle 10:52 #25223dalelePartecipante
Ho appena creato un child theme con il file style.css, ma una volta attivato è diverso dal tema genitore.
E’ possibile che il child non richiami le personalizzazioni fatte sul tema genitore?
Come posso utilizzare il tema child, che richiami però le personalizzazioni del genitore? Devo modificare il file style.css?
Grazie!
questo è il genitore: www. ti guido io.it
-
15 Agosto 2013 alle 11:21 #105274elmaniseroPartecipante
Il child theme serve per fare le personalizzazioni al sito mentre il tema genitore non deve averne nessuna.
Fare un child theme con il genitore modificato non serve a nulla, poi se hai creato un tema figlio che ha solo il file css che richiama il css del tema padre senza nessuna altra modifica è impossibile che appaia diverso, evidentemente sbagli qualcosa.
-
15 Agosto 2013 alle 12:39 #105275dalelePartecipante
Ho creato il child theme seguendo questa guida
In ogni caso l’obiettivo è quello di preservare un tema modificato da eventuali perdite, tipo a seguito di un aggiornamento.
Cosa mi consigli di fare? Va bene la creazione di un child theme (anche a modifiche già fatte) oppure devo fare un backup del tema?
Grazie,
-
15 Agosto 2013 alle 13:02 #105276elmaniseroPartecipante
In ogni caso l’obiettivo è quello di preservare un tema modificato da eventuali perdite, tipo a seguito di un aggiornamento.
Cosa mi consigli di fare? Va bene la creazione di un child theme (anche a modifiche già fatte) oppure devo fare un backup del tema?
Nessuna delle due, ti ho già dato la spiegazione prima.
Il child theme serve per fare le personalizzazioni al sito mentre il tema genitore non deve averne nessuna.
Fare un child theme con il genitore modificato non serve a nulla.
Tulle modifiche che hai fatto nel tema le devi portare nel child theme e il tema padre deve essere come il suo autore l’ha fatto.
Che siano file.php o righe di codice css e per le modifiche fatte alle funzioni pluggable del file functions.php dovrai modificarle come spiegato qui.
-
15 Agosto 2013 alle 13:13 #105277dalelePartecipante
Scusa ma parli in modo troppo difficile
Cosଠnon ci riesco.
-
15 Agosto 2013 alle 14:23 #105278elmaniseroPartecipante
Tutto quello che c’è nel tema figlio viene prima di quello che c’è nel tema padre.
Nel file functions.php ci sono funzioni pluggable che puoi sovrascrive, mentre quelle non pluggable per sovrascriverle le devi prima rimuovere, tutto qui.
Ma quali file hai modificato del tuo tema che facciamo prima?
-
15 Agosto 2013 alle 17:23 #105279dalelePartecipante
Non l’ho modificato io, ma lo ha fatto la persona che ho inaricato di fare un restyling al blog.. Quindi non so se e cosa ha modificato. Per esempio però io ho inserito tutti i codici di tracciamento analytics, tanto per dirne una…
Esiste una soluzione per cui da adesso in poi posso creare un tema child e poi lavorare su quello?
Oppure
Un’ alternativa per salvare il tema? Non posso copiare tutte le cartelle del tema originale attuale in una cartella “child” ?
Grazie
-
15 Agosto 2013 alle 17:37 #105280elmaniseroPartecipante
Non proprio, già c’è quanto detto sul file functions,php e poi per esempio, tutte le chiamate a risorse presenti nel tuo tema bisognerà cambiarle da template_directory a stylesheet_directory.
Non è cosa cosଠautomatica e semplce considerando il fatto che non sai cosa abbiano cambiato.
O ti scarichi la versione di default del tuo tema e compari ogni file con quelli del tuo tema e le apporti nel child sapendo come si fa o chiedi a qualcuno che ti faccia il lavoro, anche perchè ora tu hai una versione vecchia di due versioni rispetto a quella attuale e con il passare del tempo chissa quante cose cambieranno tra nuove versioni wp e del tuo tema e le loro compatibilità .
-
15 Agosto 2013 alle 17:56 #105281wollyAmministratore del forum
dici alla persona che ti ha fatto le modifiche che ha sbagliato e te le fai rifare correttamente.
-
15 Agosto 2013 alle 17:57 #105282dalelePartecipante
Bene. Supponi che tu puoi farmi questa cosa. Se domani aggiornano il tema, cosa succede? Continuo a lavorare sul child e nemmeno me ne accorgo?
Oppure devo di nuovo affidare il lavoro a qualcuno?
-
15 Agosto 2013 alle 18:02 #105283elmaniseroPartecipante
Al 99% non devi fare nulla, se invece, succede raramente, cambia qualcosa nel tema padre non compatibile con le modifiche fatte nel child devi fartele aggiustare.
Considera quello che ha detto wolly.
-
15 Agosto 2013 alle 18:07 #105284dalelePartecipante
Scusa se insisto, ma secondo me copiare tutte le cartelle del “padre” nella cartella del figlio e poi attivare e modificare solo il figlio…può risolvere..
Sei proprio sicuro che non sia cos�
-
15 Agosto 2013 alle 18:08 #105285dalelePartecipante
dici alla persona che ti ha fatto le modifiche che ha sbagliato e te le fai rifare correttamente.
In che senso ha sbagliato?
Devo farmi fare le modifiche sul child?
Grazie!
-
15 Agosto 2013 alle 18:10 #105286elmaniseroPartecipante
Scusa se insisto, ma secondo me copiare tutte le cartelle del “padre” nella cartella del figlio e poi attivare e modificare solo il figlio…può risolvere..
Sei proprio sicuro che non sia cos�
Te l’ho spiegato motivandolo, se poi non mi credi o chiedi ad altri o fai la prova.
In che senso ha sbagliato?
Devo farmi fare le modifiche sul child?
Esatto.
-
15 Agosto 2013 alle 19:35 #105287dalelePartecipante
In che senso ha sbagliato?
Devo farmi fare le modifiche sul child?
Esatto.
Il problema è che il child non è stato creato da chi mi ha installato il tema, ma da me, successivamente.
Pensi sia corretto chiedere adesso, a chi ha fatto il lavoro, di creare il child e renderlo uguale al tema?
-
15 Agosto 2013 alle 19:41 #105288wollyAmministratore del forum
dipende da cosa c’era scritto sul contratto.
Di fatto un professionista NON modificherà mai un tema ma creerà sempre un child theme, uno smanettone modificherà il tema.
Questo comporterà che eventuali aggiornamenti di sicurezza NON li potrai fare e neppure aggiornamenti per nuove funzionalità .
Dipende da chi hai scelto e da quanto hai pagato.
-
15 Agosto 2013 alle 20:07 #105289dalelePartecipante
Mah, provo a chiedere. Grazie per il supporto.
-
15 Agosto 2013 alle 22:41 #105294dalelePartecipante
Comunque adesso sono riuscito a far funzionare il tema child. c’era un errore nella funzione chi richiamava lo style.css (ho dovuto mettere l’estensione completa).
Ho anche creato una copia del file header.php nel child theme, perchè probabilmente è quello con più modifiche.
Spero di aver fatto bene
-
15 Agosto 2013 alle 22:48 #105295elmaniseroPartecipante
Ok, questo significa che questo è stato un topic di 19 post inutile.
Se metti il tema originale vedrai che bel casino ti succede.
Contento tu ………………. contenti tutti.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.