Tagged: catch box
- This topic has 7 replies, 2 voices, and was last updated 8 years, 10 months ago by Pratik.
-
AuthorPosts
-
December 25, 2015 at 2:46 pm #81671emree025Participant
Hello dear friend. Thank u very much for these great theme.
I use latest catch box version.
How to change the word “menu” (into another word) beside of the menu button in the mobile version. Best regards.December 26, 2015 at 8:21 am #81683PratikParticipantHi @emree025,
This option is not available in free version but is available in Catch Box Pro version.If you want to do it in a free version, you need to do a bit of customization via Child theme. Follow following instructions:
1. You will need to create a child theme for Catch Box. Its details can be found here
2. If you go through theme file catch-box-pro/inc/catchbox-menus.php file, you can find functions named catchbox_mobile_header_nav_anchor() and catchbox_mobile_footer_nav_anchor().
3. You can copy and paste these functions in your child theme’s functions.php and make the modifications in this the lines 218, 232 and 259 (with reference to the original file). The three lines are for Primary Menu, Secondary Menu and Footer Menu respectively.This will work if you do it properly. Hope this helps. Let me know how things work out.
December 26, 2015 at 11:26 pm #81706emree025ParticipantHello Pratik, thank u for answer. I am beginner.
1) I’ve still created a child theme.
2) I’ve found this functions in catch-box/inc/catchbox-menus.php:if ( ! function_exists( ‘catchbox_mobile_header_nav_anchor’ ) ) :
/**
* This function loads Mobile Menus Anchor in Header Section
*
* @get the data value from theme options
* @uses catchbox_after_headercontent action to add in the Header
*/
function catchbox_mobile_header_nav_anchor() {
//Getting Ready to load options data
$options = catchbox_get_theme_options();// Header Left Mobile Menu Anchor
if ( has_nav_menu( ‘primary’ ) ) {
$classes = “mobile-menu-anchor primary-menu”;
}
else {
$classes = “mobile-menu-anchor page-menu”;
}
?>
<div class=”menu-access-wrap clearfix”>
<div id=”mobile-header-left-menu” class=”<?php echo $classes; ?>”>
<span class=”mobile-menu-text”><?php _e( ‘Menu’, ‘catch-box’ );?></span>
</div><!– #mobile-header-menu –><?php
if ( ( !empty ( $options [‘enable_menus’] ) && has_nav_menu( ‘secondary’ ) ) ) {
$classes = “mobile-menu-anchor secondary-menu”;
}
else {
return;
}
?>
<div id=”mobile-header-right-menu” class=”<?php echo $classes; ?>”>
<span class=”mobile-menu-text”><?php _e( ‘Secondary Menu’, ‘catch-box’ );?></span>
</div><!– #mobile-header-menu –>
</div><!– .menu-access-wrap –><?php
}
endif; //catchbox_mobile_header_nav_anchoradd_action( ‘catchbox_after_headercontent’, ‘catchbox_mobile_header_nav_anchor’, 20 );
if ( ! function_exists( ‘catchbox_mobile_footer_nav_anchor’ ) ) :
/**
* This function loads Mobile Menus Anchor in Footer Section
*
* @get the data value from theme options
* @uses catchbox_footer_menu action to add in the Header
*/
function catchbox_mobile_footer_nav_anchor() {
//Getting Ready to load options data
$options = catchbox_get_theme_options();if ( ( !empty ( $options [‘enable_menus’] ) && has_nav_menu( ‘footer’ ) ) ) { ?>
<div class=”menu-access-wrap clearfix”>
<div id=”mobile-footer-menu” class=”mobile-menu-anchor footer-menu”>
<span class=”mobile-menu-text”><?php _e( ‘Footer Menu’, ‘catch-box’ );?></span>
</div><!– #mobile-footer-menu –>
</div><!– .menu-access-wrap –>
<?php
}
}
endif; //catchbox_mobile_footer_nav_anchoradd_action( ‘catchbox_footer_menu’, ‘catchbox_mobile_footer_nav_anchor’, 20 );
3) I still not use functions php in child catch box theme. Should I create new file called functions.php and than copy and past this full code in a functions.php ?
4) Could yo please help im modifying ? Is there maybe a easyier way ?
Best regards 🙂
December 27, 2015 at 7:09 pm #81721PratikParticipantHi @emree025,
If you check the link I gave you for child themes, near the bottom of the post, there are sample child themes. If you get the one for Catch box, it will have a functions.php file. Then just paste that function and change the text as I mentioned in the lines. Easier way would be to upgrade to pro. Pro theme has these options.December 29, 2015 at 3:37 am #81792emree025ParticipantHello dear Pratik. Thank you for answer. Should I copy and past the whole function above even I use only primary menu? In which line of this child theme functions.php i should past the function?
<?php
/**
* Child Theme functions and definitions
*
*//**
* Loading Parent theme stylesheet
*
*/
add_action( ‘wp_enqueue_scripts’, ‘catchbox_child_enqueue_styles’ );
function catchbox_child_enqueue_styles() {
wp_enqueue_style( ‘catchbox-parent-style’, get_template_directory_uri() . ‘/style.css’ );
}December 29, 2015 at 9:49 am #81807PratikParticipantHi @emree025,
Since you only use Primary Menu, add following function below the existing code in functions.php:/** * This function loads Mobile Menus Anchor in Header Section * * @get the data value from theme options * @uses catchbox_after_headercontent action to add in the Header */ function catchbox_mobile_header_nav_anchor() { //Getting Ready to load options data $options = catchbox_get_theme_options(); // Header Left Mobile Menu Anchor if ( has_nav_menu( 'primary' ) ) { $classes = "mobile-menu-anchor primary-menu"; } else { $classes = "mobile-menu-anchor page-menu"; } ?> <div class="menu-access-wrap clearfix"> <div id="mobile-header-left-menu" class="<?php echo $classes; ?>"> <a href="#mobile-header-left-nav" id="header-left-menu" class="genericon genericon-menu"> <span class="mobile-menu-text"><?php _e( 'Alternate Primary Menu Text', 'catch-box' );?></span> </a> </div><!-- #mobile-header-menu --> <?php if ( ( !empty ( $options ['enable_menus'] ) && has_nav_menu( 'secondary' ) ) ) { $classes = "mobile-menu-anchor secondary-menu"; } else { return; } ?> <div id="mobile-header-right-menu" class="<?php echo $classes; ?>"> <a href="#mobile-header-right-nav" id="header-right-menu" class="genericon genericon-menu"> <span class="mobile-menu-text"><?php _e( 'Secondary Menu', 'catch-box' );?></span> </a> </div><!-- #mobile-header-menu --> </div><!-- .menu-access-wrap --> <?php }
In above code, you will find Alternate Primary Menu Text. Change this to your desired text.
December 31, 2015 at 6:00 am #81944emree025ParticipantThank you for support. I passed to change the word, but the the word “menü” seems did not work well because of the letter “ü”
January 5, 2016 at 10:06 am #82225 -
AuthorPosts
- The topic ‘How to change the word "menu" in mobile version’ is closed to new replies.