WordPress themes from templatesold.com do not support WordPress 3.0 Menu feature, at this writing on January 23, 2011, and, for that matter, probably do not support WP3.0 new features in general. I had to tweak the theme to coax it to work with WP3.0′s menu. Here are the changes I did to the QwertyPress theme:

  • changes to functions.php; add the code block below to the beginning of the functions.php file;
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    
    add_action( 'after_setup_theme', 'qwertypress_setup' );
     
    if ( ! function_exists( 'qwertypress_setup' ) ):
    	function qwertypress_setup() {
    		// This theme uses wp_nav_menu() in one location.
    		register_nav_menus( array(
    			'primary' => __( 'Primary Navigation', 'qwertypress' ),
    		) );
    	}
    endif;
     
    function qwertypress_page_menu_args( $args ) {
    	$args['show_home'] = true;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'qwertypress_page_menu_args' );

    Note: for a different theme, you may need to update the few places that are theme-specific like “qwertypress_setup”, “qwertypress”, and etc.

  • changes to header.php; replace the code below
    1
    2
    3
    
        <ul>
          <?php wp_list_pages('title_li='); ?>
        </ul>

    with

    1
    2
    3
    4
    5
    6
    7
    
      	<?php 
    	wp_nav_menu( array( 
    			   'container' => 'none',
    			   'menu_class' => 'sf-menu',
    			   'theme_location' => 'primary' 
    			   ) ); 
    			   ?>
  • Digg
  • del.icio.us
  • StumbleUpon
  • Sphinn
  • Facebook
  • Mixx
  • Google Bookmarks
  • Haohao
  • LinkedIn
  • Live
  • MyShare
  • MySpace
  • Reddit
  • Technorati
  • TwitThis

Related posts:

  1. Tweaking the Flow Player WordPress Plugin
  2. Finding a Twitter Plugin for WordPress Blog
  3. Creating a Clone of a WordPress Website
  4. False Alarm: WP-Print Got to Work After All
  5. how to exclude categories from the category widget in the side bar – WordPress 2.8.0 – 2.8.4

Tags: , , , , ,

4 Responses to “Tweaking TemplateSold WordPress Template to Work with 3.0 Menu Feature”

  1. Hello! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing months of hard work due to no data
    backup. Do you have any methods to protect against hackers?

  2. innova says:

    William, your site is very nicely done. How did you finally figure out how to customize the menu? I’m stuck also.
    Thanks.

  3. wiliam says:

    I tried to use your code for template simplewhite. However I had no success. Any help would be greatly appreciated! Would love to get those menus working.

    My site is: roomservicesd.com

    Thanks!!

  4. ChunHua says:

    Hi,

    Please see http://www.shinsshins.com/test

    How come the drop-down menu did not work? Suppose test1 and test 2 is dropdown below sample page and a page is beside sample page?

    Thank You.

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">