Wp 3.0 themes not compatible with wp 2.9

Discussion in 'WordPress' started by mrpixel, Jul 15, 2010.

  1. #1
    Hello everyone,

    Have you noticed that wp 3.0 themes are not compatible with wordpress 2.9(even the new 3.0 default theme got this issue), i recive this error:

    Fatal error: Call to undefined function register_nav_menus()
    PHP:
    What do you suggest?

    Thank you
     
    mrpixel, Jul 15, 2010 IP
  2. bhuthecoder

    bhuthecoder Member

    Messages:
    245
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    43
    #2
    open header.php and replace

    
    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    
    Code (markup):
    with

    <?php wp_page_menu( ); ?>
    Code (markup):
     
    bhuthecoder, Jul 15, 2010 IP
  3. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #3
    They would be compatible if their authors checked for new functions before using them. It's pretty basic, all you need to do is this:
    
    if ( function_exists( 'register_nav_menus' ) ) {
       register_nav_menus(...);
    }
    Code (markup):
     
    Cash Nebula, Jul 16, 2010 IP