ThemeShaper Forums » Thematic

[closed]

Adding home page - newbie needing help

(3 posts)
  • Started 9 years ago by philm
  • Latest reply from philm
  • This topic is resolved
  1. Hi all

    New to building my own wordpress theme and thematic and I've got a bit stuck.

    I would like to add a 'home page' link to my child theme, I have removed the comments in my child theme function.php file so I now have this

    <?php

    $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');

    ?>

    Do I need to change anything in the main .php files for the rest of the theme to get this to work?

    Sorry, realise this is probably a very obvious question, if someone could point me in the right direction I would really appreciate it.

    Thanks
    Phil

    Posted 9 years ago #
  2. Hi Phil,

    You're headed in the right direction but it looks like you removed more than just the comment. YOur functions.php should look like this:

    <?php
    function childtheme_menu_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');
    
    ?>
    Posted 9 years ago #
  3. Thank you, that's fixed it, I knew it had to be something simple.

    Cheers
    Phil

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.