Home › Forum › Problemi Vari con WP › menu non funziona su smartphone
-
AutorePost
-
-
25 Maggio 2016 alle 17:28 #30876madamalePartecipante
Ciao a tutti,
quando accedo al mio sito wp con uno smartphone, il menu è visualizzato come un pulsante.
Mi aspetterei che nel momento in cui clicco sul pulsante si aprano (tipo tendina) le varie opzioni (i miei tab del menu), ma cosi non è.
Semplicemente non succede nulla
Cosa sto sbagliando?
grazie a tutti!
-
25 Maggio 2016 alle 19:20 #120515wollyAmministratore del forum
Il tema avrà degli errori. Chiedi all’autore come risolvere. Magari ci sarà un aggiornamento.
-
26 Maggio 2016 alle 16:56 #120519madamalePartecipante
grazie mille per l’info!
il tema è Twenty Twelve, Versione 1.9
come trovo l’autore?
-
26 Maggio 2016 alle 19:49 #120520wollyAmministratore del forum
La prima cosa che puoi fare è aggiornarlo, la versione corrente è la 2.0
-
28 Maggio 2016 alle 17:16 #120529madamalePartecipante
ma se aggiorno il tema perdo le varie modifiche che ho fatto (e di cui non ho tenuto traccia, se non nel backup che ho appena eseguito…)
lo so, non sono stato furbo, in ogni caso non credo sia un problema del tema, ma mio o meglio di qualcosa che ho toccato
come posso capire dove sta il baco?
-
29 Maggio 2016 alle 15:54 #120531madamalePartecipante
ho provato a creare un tema figlio ma evidentemente sto sbagliando qualcosa:
1. creato la nuova directory “twentytwelve-child”
2. in questa directory ho messo i due files necessari:
-
style.css
functions.php
3. come richiesto, style.css comincia con:
/*
Theme Name: Twenty Twelve Child
Theme URI: https://wordpress.org/themes/twentytwelve-child/
Description: Twenty Twelve Child Theme
Author: me
Author URI: https://wordpress.org/
Template: twentytwelve
Version: 1.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
Text Domain: twentytwelve-child
*/
4. come richiesto, functions.php comincia con:
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
?>
<?php
function theme_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style )
);
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
?>
5. nella nuova directory ho inserito anche i files che ho modificato:
content.php
footer.php
comments.php
header.php
MA, alla fine, in "Administration Panels > Appearance > Themes", vedo l'errore:
Tema corrotto:
Modello mancante. I temi devono avere un file di modello index.php . I temi Child devono avere una intestazione di modello nel foglio di stile style.css.
ma l'articolo "https://codex.wordpress.org/Child_Themes" non parla anche di index.php...
cosa sto sbagliando? -
29 Maggio 2016 alle 17:08 #120532TittiModeratore
Sbagli perché le istruzioni non dicono di fare cosଠ(e già che qualcuno ha fatto lo sforzo di tradurla, potevi usare la versione italiana di quella pagina, magari capivi meglio).
style.css:
/*
Theme Name: Twenty Twelve Child
Template: twentytwelve
Version: 1.0
*/(tutto il resto non è necessario, anche la versione non lo è)
functions.php:
<?php
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}Basta. Non mettere nient’altro prima di assicurarti che funzioni (e funziona per forza).
Vai in bacheca, attivalo.
Poi aggiorni il tema originale twenty twelve, da bacheca.
Se tutto va bene, è solo a questo punto che sei pronto per partire con le modifiche, che rifarai un file alla volta, copiandolo dall’originale aggiornato, e guardando che tutto funzioni prima di passare all’altro.
Per quanto riguarda l’errore che dicevi, è in uno di quei file modificati da te, verosimilmente header.php, ma non è detto.
-
29 Maggio 2016 alle 20:03 #120536madamalePartecipante
Ciao Titti,
grazie per le dritte.
Non ho letto la pagina in italiano perchè non sapevo esistesse, mi hanno consigliato quel link in inglese.
Se mi dai il link in italiano mi leggo pure quello.
Poi: funzionerà anche per forza ma a me da ancora lo stesso identico errore, vedi sotto.
Riassumendo: ho creato la cartella: wp-contentthemestwentytwelve-child
dentro adesso, su tuo consiglio, ho messo solo style.css e functions.php, con le modifiche che mi hai consigliato.
Nella cartella non c’è altro ma nella bacheca, sezione temi, ho ancora lo stesso errore…
So di essere io a sbagliare, potresti darmi qualche altra indicazione per correggere l’errore?
-
30 Maggio 2016 alle 8:57 #120537TittiModeratore
Ho visto che hai messo il trattino nel nome del child (è OK, non toglierlo), ma sostituisci allora nel functions.php:
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' );
function enqueue_parent_theme_style() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}Poi, per esser sicuri che il tema padre sia giusto, scarica da qui sul tuo pc l’originale, e scompatta il pacchetto. Via FTP cancella la cartella twentytwelve, e carica il contenuto della cartella che hai scaricato.
Le istruzioni in italiano le trovi alla pagina che hai citato, cliccando su “Italiano”, in alto.
-
31 Maggio 2016 alle 8:13 #120540madamalePartecipante
ciao Titti,
ho modificato il file functions.php come mi hai consigliato ed ho seguito alla lettera le istruzioni in italiano fino al paragrafo “Template” escluso
Questo perchè andando nella pagina “Pannello di amministrazione > Aspetto > Temi” vedo lo stesso errore di prima
al momento nella cartella wp-contentthemestwentytwelve-child ho solo due files:
functions.php
style.css
cosa mi manca?
-
31 Maggio 2016 alle 8:53 #120541elmaniseroPartecipante
A parte il fatto che lo style.css del child theme si usa per modificare solo gli elementi che vuoi cambiare e non serve caricare tutto lo stile.css del tema padre come hai fatto qui
Cancella tutta la cartella child che hai creato, installa il tema originale come ti è già stato detto e che ancora non hai fatto, disattiva tutti i plugins e usa questo plugin a prova di bambino per creare un child theme.
-
31 Maggio 2016 alle 10:34 #120543madamalePartecipante
grazie elmanisero
anche per la cortesia del tuo post
risolto
-
31 Maggio 2016 alle 10:56 #120544elmaniseroPartecipante
Questo era il corretto link http://www.techfly-snc.it/wp-content/themes/twentytwelve-child/style.css allo style.css che avevi creato e che è rimasto lo stesso come immutata è la tua situazione che non hai risolto per nulla.
Contento tu contenti tutti.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.