Child-theme functions.php and changing home-button
-
Hello there,
I have a basic question. I just want to change the default name of “home” page and into “blog” or something.
I found few solutions for it as below;
in your child theme’s functions.php, add some code;Solution 1
add_action( 'after_setup_theme', 'twentyeleven_child_theme_setup' ); function twentyeleven_child_theme_setup() { add_filter( 'wp_page_menu_args', 'twentyelevenchild_page_menu_args' ); } function twentyelevenchild_page_menu_args( $args ) { $args['show_home'] = 'Welcome!'; // rename 'home' button return $args;}
Solution 2
If we are talking about the default theme “Twenty Twelve”:Open ../twentytwelve/functions.php
Find twentytwelve_page_menu_args function.Replace
$args['show_home'] = true;with
$args['show_home'] = "Your name";But, I want to make this change without touching the core files. I just want to use child-theme option to do it. So how can I edit functions.php using child-theme option since it is impossible to copy it into child-theme folder?
Thanks
The topic ‘Child-theme functions.php and changing home-button’ is closed to new replies.