Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #81671
    emree025
    Participant

    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.

    #81683
    Pratik
    Keymaster

    Hi @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.

    #81706
    emree025
    Participant

    Hello 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_anchor

    add_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_anchor

    add_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 🙂

    #81721
    Pratik
    Keymaster

    Hi @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.

    #81792
    emree025
    Participant

    Hello 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’ );
    }

    #81807
    Pratik
    Keymaster

    Hi @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.

    #81944
    emree025
    Participant

    Thank you for support. I passed to change the word, but the the word “menü” seems did not work well because of the letter “ü”

    #82225
    Pratik
    Keymaster

    HI @emree025,
    Can you try to use &uuml; instead of that character. It should work.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘How to change the word "menu" in mobile version’ is closed to new replies.