www.question-defense.com | Engage: Visit :: Login :: Register
Translate to English Übersetzen Sie zum Deutsch/German Переведите к русскому/Russian Μεταφράστε στα ελληνικά/Greek Vertaal aan het Nederlands/Dutch ترجمة الى العربية/Arabic 中文翻译/Chinese Traditional 中文翻译/Chinese Simplified 한국어에게 번역하십시오/Korean 日本語に翻訳しなさい /Japanese Traduza ao Português/Portuguese Traduca ad Italiano/Italian Traduisez au Français/French Traduzca al Español/Spanish
0

One of my favorite themes for WordPress is the Mandigo theme provided by a great developer named Tom from OneHertz.com. The theme is highly customizable and provides ways to customize things outside of the core files so when you upgrade you are not required to make all the modifications over again. I suggest anyone looking for a 2 or 3 column WordPress theme to check this out. One thing I like to do after installing the Mandigo theme is to modify the order of the header navigation. The header navigation links are dynamically generated from top level pages you have created. Below are brief instructions on how to make sure the order of the header navigation menu is in the order you want them to be in as well as a brief description of the code that allows this to happen.

Modify WordPress Mandigo Theme Header Menu Order:

Modifying the header menu order is very easy but each time you add a page you will need to make sure to keep up with the configuration. To modify the header menu order simply set the Order (located under Attributes) for each top level page created. Attributes is the title of a box in the right column when you are editing or creating each page and is shown in the below image.

WordPress Page Edit Attributes

As you can see above there are three different configuration items located under Attributes which include Parent, Template, and Order. If the page you are creating is a top level page meaning it has no parent page then you will need to set the Order attribute. The order starts with 0 and moves up from there and if numerous pages have duplicate Order numbers then the page ID will be used. So if you have three pages titled Company, News, and Support that should show up in alphabetical order but they are not just modify the Order attribute of each page. In this example if you make the Company page have Order 1, the News page have Order 2, and the Support page have Order 3 then they will now display in the Mandigo WordPress theme in the proper order.

Mandigo Theme Header Menu Code Location:

The above order is specified in the header.php file which is located in the wp-content/themes/mandigo directory. In the header.php file the top menu is created on lines 315 to 331 as shown below.

Mandigo WordPress Theme Header Navigation Menu Code Snipet:

315   <ul>
316    <li><a href="<?php echo get_option('home'); ?>/"><?php _e('Home', 'mandigo'); ?></        a></li>
317  <?php
318         // wordpress pages, minus the ones excluded in the theme options
319         wp_list_pages(
320                 array(
321                         'sort_column' => 'menu_order',
322                         'depth'       => ($mandigo_options['header_navigation_no_submenus'] ? 1 : 0),
323                         'title_li'    => '',
324                         'exclude'     => @implode(',', $mandigo_options['header_navigation_exclude_pages']),
325                 )
326         );
327         // if you want to add custom static links at the end, use something similar to the following
328         // <li><a href="http://whatever.com/">Go somewhere</a></li>
329         // and put it right before the closing </ul>
330  ?>
331    </ul>

The specific line that determines the pages order in the array is line 321 which specifies to sort the column by menu order. Again menu order is determined dynamically by whatever you set while editing each page in the WordPress admin.


Building a WordPress Blog People Want to Read

Scott McNulty. Peachpit Press 2008, Paperback, 272 pages, $15.78

4.0


WordPress For Dummies (For Dummies (Computer/Tech))

Lisa Sabin-Wilson. For Dummies 2009, Paperback, 408 pages, $13.96

4.0

DeliciousStumbleUponDiggTwitterMixxTechnoratiFacebookNews VineLinkedInYahoo! Bookmarks
Related posts:
  1. WordPress Mandigo Theme: Unable To Remove A Excluded Page From Header Navigation A WordPress site I recently helped develop had an issue...
  2. Wordpress Blog With Mandigo Theme Not Displaying Via Firefox As you can see we have the Mandigo theme installed for...
  3. Remove the Website Field For Comment Posting on WordPress Using Mandingo Theme In an attempt to promote as much community as possible...
  4. Create a WordPress Template to List All Tags on a Single Page: wp_tag_cloud Previously I created an article about listing all WordPress tags...
  5. Set Home Screen Icon With The WPtouch iPhone Theme WordPress Plugin Question Defense uses the WPtouch iPhone Theme Wordpress plugin for...

Tags: , , , , , , , , ,
Leave a Reply