WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. PrfctGdess
    Member
    Posted 1 year 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:

    <?php
                    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' )
                        );
                    endif;
                ?>

    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/)

    http://wordpress.org/extend/themes/dkret3/

  2. kretzschmar
    Member
    Theme Author

    Posted 1 year 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. PrfctGdess
    Member
    Posted 1 year 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
    Member
    Theme Author

    Posted 1 year 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