The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Change "Start" to "Home" on nav bar (4 posts)

  1. ColumbiaWebDev
    Posted 4 years ago #

    I'm using dkret3 and so far I'm LOVING it, great job!

    I've created a child theme to change the minor things (colors, fonts, etc) I wanted changed, but I'm stumped on one issue. I have a main page that does not have a title; by default, the dkret3 theme shows this page as "Start" on my navigation bar. I'd like to change that to read "Home", but I do NOT want to modify the original files, I want to keep all changes to my child theme.

    The line I need to modify is in access-menu.php...this section is setting the default:

                    if ( has_nav_menu( 'access-menu' ) ) :
                        wp_nav_menu( array(
                            'theme_location' => 'access-menu',
                            'container_class' => 'header-menu',
                            'menu_class' => 'sf-menu',
                            'fallback_cb' => '' )
                    else :
                        wp_page_menu( array(
                            'show_home' => __( 'Start','dkret' ),
                            'depth' => 4,
                            'menu_class' => 'header-menu',
                            'sort_column' => 'menu_order' )

    Obviously, I could change the code to read

    'show_home' => __( 'Home','dkret' )

    but I'd rather not modify any core files for easier future updating. Can I add something to a page in my child theme to change that default value? Or is there a better way to go about this? TIA!!

    (my development site, if you want to see what I'm looking at, is http://dev4.wetpaintdesigns.com/)


  2. kretzschmar
    Theme Author

    Posted 4 years ago #

    Just copy the changed access-menu.php to your child theme. Then WordPress will use it instead of the one inside the dkret3 folder.
    It is that easy (I hope).

  3. ColumbiaWebDev
    Posted 4 years ago #

    Thanks for the reply. So let's say I just copy the access-menu.php file, make the changes, and save it in my child theme...

    What if something changes in the core access-menu.php file when there's an update? I'd have to know to modify my child file as well. Is there a way to include the original file, but overwrite this one section with a custom value (like you can do with the css files)?

  4. kretzschmar
    Theme Author

    Posted 4 years ago #

    There won't be any changes. Only if dkret should reach a version 4.0.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic