ThemeShaper Forums » Thematic

[closed]

WP 3.0 home link in menu

(10 posts)
  • Started 3 years ago by tsjogren
  • Latest reply from em hr
  • This topic is resolved
  1. tsjogren
    Member

    Hi

    I have a problem with the 'home' link position in the navigation menu. It is number two from (left to right) and i want it to be number one (far left).

    I have selected 'static home-page' in wp-admin and added wp 3.0 menusupport in functions.php like so (full code provided)

    When i add the page 'home' to wp menu manager it dosent matter where i drag it, it stays number two in the menu. (Its ok that i cant move it around, i just want it to be far left)

    Tips??

    -------------
    <?php

    //
    // Custom Child Theme Functions
    //

    // I've included a "commented out" sample function below that'll add a home link to your menu
    // More ideas can be found on "A Guide To Customizing The Thematic Theme Framework"
    // http://themeshaper.com/thematic-for-wordpress/guide-customizing-thematic-theme-framework/

    // Adds a home link to your menu
    // http://codex.wordpress.org/Template_Tags/wp_page_menu
    //function childtheme_menu_args($args) {
    // $args = array(
    // 'show_home' => 'Home',
    // 'sort_column' => 'menu_order',
    // 'menu_class' => 'menu',
    // 'echo' => true
    // );
    // return $args;
    //}
    //add_filter('wp_page_menu_args','childtheme_menu_args');

    // Lägg till WP 3 menyer
    add_theme_support( 'menus' );

    function child_access_menu() {
    $menu_sys = 'wp_nav_menu';
    return $menu_sys;
    }
    add_filter('thematic_menu_type', 'child_access_menu');

    // Ta bort bloggbeskrivning

    function remove_thematic_actions() {
    remove_action('thematic_header','thematic_blogdescription',5);
    }
    add_action('init','remove_thematic_actions');
    ?>

    Posted 3 years ago #
  2. I don't think you need that "Add Home Link" code anymore.

    If you have a static home page, and it's called home, and it shows up in the WP3.0 Menu manager as a draggable option, i would guess that the 'add home link' code is what is causing your problem, and is unnecessary.

    Posted 3 years ago #
  3. tsjogren
    Member

    As you see on the code provided the function is commented out. So it cant be that problem. It dosent matter if i add the static page called 'Hem' (Swedish) to WP3.0 menu manager or not. Is is still in the frontend menu as number two...

    Any tips are welcome.

    Posted 3 years ago #
  4. tsjogren
    Member

    Link to testpage that i play around with: http://eskestugan.se.preview.binero.se/

    Thematic Framework version: 0.9.6.2
    WP version 3.0.1 (Swedish)

    Posted 3 years ago #
  5. Odd. I would disable Wordpress 3.0 menu support and see if anything changes.

    I'd also try creating a different page, and setting that page as the home page instead of your current hem page. Does the page you have set as the blog page have a post loop?
    I believe things go weird if the page specified as the blog page doesn't have a post loop.

    Posted 3 years ago #
  6. Hi-

    The issue here is that the thematic_menu_type filter hook does not exist in Thematic 0.9.6.2

    You need to be using either the latest svn version or Thematic 0.9.7.3 when it gets released to use that filter.

    -Gene

    Posted 3 years ago #
  7. tsjogren
    Member

    Hi Gene

    Thanks for the reply. I will try the svn-version. Is there a releasedate for 0.9.7.3?

    Posted 3 years ago #
  8. Unfortunately there have been minor issues involving Thematic and the theme review process that have blocked it from a full release via the official WordPress Theme repository. IMO Thematic 0.9.7.3 is strong and bug free. I am using it on several live sites with absolutely no issues.

    One caveat though, addressing issues concerning Thematic in these forums can get confusing when using a SVN or pre-release version. The beginnings of this thread are a good example of this pitfall.

    -Gene

    Posted 3 years ago #
  9. tsjogren
    Member

    Hi Gene

    I downloaded 0.9.7.3 via 'http://developing.thematic4you.com/thematic-development-release/', added the code below in 'functions.php'(child theme folder) and the wp 3.0 menuhandling worked perfect. Thanks for your forum support.

    add_theme_support( 'menus' );

    function child_access_menu() {
    $menu_sys = 'wp_nav_menu';
    return $menu_sys;
    }
    add_filter('thematic_menu_type', 'child_access_menu');´

    It would be great if there was a sticky post or a blog post about Thematic and WP 3.0 menus informing that 0.9.7.3 is required. I think many new Thematic "adopters" will be grateful for this info.

    /Torbjörn (Sweden)

    Posted 3 years ago #
  10. Hi,

    Heads up using add_theme_support in this way is not advised

    ref: http://forums.themeshaper.com/topic/add_theme_supportmenus

    -Gene

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.