create own wordpress theme (tewnty ten as base)

Mar 13, 2012   //   by   //   Blog, Wordpress Theme Tutorial  //  No Comments

I have to create a customized wordpress theme. i still don’t how it should look like, so viewed the twenty ten theme files to figured out what i could customize. so i searched for the menu build function in the header.php file and found this

<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?> <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>

but i cant figure out what this function does…where is written how the menu is created with html tags like ul, li and so on… i wan’t to edit the html code!

To fix this Problem:
Check out the documentation for wp_nav_menu in the codex. It’s a menu system added to WordPress back at version 2.9 (I believe). If you navigate in your dashboard to Appearance -> Menus, you can customize it through an interface. In Twenty Ten, the fallback is wp_page_menu, which displays a list of your pages. Should you prefer to build yours by hand and hard code it into the theme (not advisable, but possible) just delete the relevant code and replace it with your own HTML.

please look into the Menu interface, create a menu, assign it to the theme position ‘primary’, and go from there with a properly configurable and WP-driven menu.

Leave a comment

Share This Post

RSS Wordpress News

  • The Year in Review (and Resolutions for 2018) January 3, 2018
    It was quite a year for the community, and we've got a lot to look forward to.
  • Managing Your Blog On a Mobile Device December 13, 2017
    A few enhancements we've added to the iOS and Android apps for easier blogging.
  • New Premium Themes: Small Business and Photo Blog December 7, 2017
    Introducing two new premium themes: Small Business, made for your entrepreneurial endeavors, and Photo Blog, designed to make your photography shine.
  • Updated Privacy Policy December 4, 2017
    As part of our commitment to privacy and transparency, we’re updating our Privacy Policy. We want to give you more information about how we collect and use personal information — in a more organized and readable format. “Your privacy is critically important to us.” These are the first words of …
  • Update Your Avatar on October 12, 2017
    Manage, upload, and edit your profile photo at
  • A New Media Picker for the iOS WordPress App October 9, 2017
    Sometimes it’s the extra touches that make all the difference; on your website, that’s the photos and video that give your content life. You asked for streamlined access to your media library and the camera and photos on your device, to make uploading and inserting photos and videos easier. We …