vendredi 24 octobre 2014

How to generate my menu in primary location in wordpress php site


Vote count:

0




to avoid installing my menu in each pages (sidebar.php, index.php, category.php, etc.), i create a template part (a php.file) for my menu, for example :



<?php
/**
* The template for displaying menu in Twenty Eleven Child Theme
*
* @package WordPress
* @subpackage My Twenty_Eleven Child Theme
* @since My Twenty Eleven Child Theme 1.0
*/
?>

<div id="menu">
<ul>
<li>
<a href="http://www.mylink1.com/">home</a>
</li>
<li>
<a href="http://www.mylink2.com/">about</a>
</li>
<li>
<a href="http://www.mylink3.com/">contact</a>
</li>
</ul>
</div>


Then i install the <?php get_menu(); ?> after the <div id="primary"> in each page where i want to show the menu...


I guess i must also make some codes in the function.php (register the menu), how should i do ??? What else should i do still ?


Please note that i do not know much about php !


Thanks for your help in advance !



asked 3 mins ago







How to generate my menu in primary location in wordpress php site

Aucun commentaire:

Enregistrer un commentaire