Visualizzazione 1 filone di risposte
Visualizzazione 1 filone di risposte
- Devi essere connesso per rispondere a questo topic.
Email: info@wpitaly.it
Home › Forum › Problemi Vari con WP › Non visualizzo il menu dal backend
Buongiorno, sto creando un template partendo da zero. L’unico problema che riscontro è che dal back end non visualizzo la voce “menu” sotto “aspetto”. Ho provato con i template di default e funziona correttamente, ho disattivato i plugin ma senza risultato. Sto lavorando con un tema child
Vi dico le azioni che ho fatto:
1) all’interno del function.php ho aggiunto queste righe di codice per mostrare il menu:
<?php
register_nav_menus(
array(
‘primary’ => ‘Primary Menu’,
)
);
?>
2) nell’header.php ho aggiunto questa riga di codice:
<nav class=”navbar-collapse collapse” id=”navbar-main”>
<?php
wp_nav_menu( array( ‘container_class’ => ‘main-nav’, ‘theme_location’ => ‘primary’ ) );
?>
</nav>
Dal front end, nel menu principale, vedo la pagina di default di WordPress (diciamo la pagina di prova). Come posso risolvere?
Grazie anticipato,
Roberto
// Register Navigation Menus
function custom_navigation_menus() {
$locations = array(
);
register_nav_menus( $locations );
}
add_action( ‘init’, ‘custom_navigation_menus’ );
WPItaly - Copyright Creative Commons: CC BY-NC-SA 4.0