Tagged: 

Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #440877

    To get the mobile menu options, I followed your directions and amended my avia.js file, have I have added this to my enfold child theme functions.php:

    avia_nav_menus(); function avia_nav_menus() { global $avia_config, $wp_customize; $avia_config[‘nav_menus’] = array( ‘avia’ => array(‘html’ => __(‘Main Menu’, ‘avia_framework’)), ‘avia2’ => array( ‘html’ => __(‘Secondary Menu <br/><small>(Will be displayed if you selected a header layout that supports a submenu here)</small>’, ‘avia_framework’), ‘plain’=> __(‘Secondary Menu – will be displayed if you selected a header layout that supports a submenu’, ‘avia_framework’)), ‘avia3’ => array( ‘html’ => __(‘Footer Menu <br/><small>(no dropdowns)</small>’, ‘avia_framework’), ‘plain’=> __(‘Footer Menu (no dropdowns)’, ‘avia_framework’)), ‘avia_responsive’ => array( ‘html’ => __(‘Responsive Menu <br /><small>(If set will replace your main menu on mobiles)</small>’)) ); add_theme_support(‘nav_menus’); foreach($avia_config[‘nav_menus’] as $key => $value) { $name = (!empty($value[‘plain’]) && !empty($wp_customize)) ? $value[‘plain’] : $value[‘html’]; register_nav_menu($key, THEMENAME.’ ‘.$name); } } add_action( ‘ava_after_main_menu’, ‘enfold_customization_add_responsive_menu’ ); function enfold_customization_add_responsive_menu() { echo “<nav style = ‘display:none;’ class=’main_menu_responsive’ data-selectname='”.__(‘Select a page’,’avia_framework’).”‘ “.avia_markup_helper(array(‘context’ => ‘nav’, ‘echo’ => false)).”>”; $avia_theme_location = ‘avia_responsive’; $avia_menu_class = $avia_theme_location . ‘-menu’; $args = array( ‘theme_location’ => $avia_theme_location, ‘menu_id’ => $avia_menu_class, ‘menu_class’ => ‘menu av-main-nav’, ‘container_class’ => $avia_menu_class.’ av-main-nav-wrap’.$icon_beside, ‘fallback_cb’ => false, ‘walker’ => new avia_responsive_mega_menu() ); wp_nav_menu($args); echo ‘</nav>’; }

    function wp_change_aviajs() {
    wp_dequeue_script( ‘avia-default’ );
    wp_enqueue_script( ‘avia-default-child’, get_stylesheet_directory_uri().’/js/avia.js’, array(‘jquery’), 2, true );
    }
    add_action( ‘wp_print_scripts’, ‘wp_change_aviajs’, 100 );

    I have a couple questions:
    1) I had made the changes to get the mobile menu options without adding that last section ( “function…100 ); ) to my child theme functions.php, and when I recently updated Enfold, I of course lost the changes to my avia.js (expected) but also lost the “avia_nav_menus();… echo ‘</nav>’; }” code from my child theme editor (not expected). I thought updates only affected the main enfold theme. The changes I made now are supposed to ensure that the mobile menus function even after an update without editing the avia.js file, right?

    2) Looking at my menu page now, I see a different naming convention at the bottom like this: http://imgur.com/Z2V6gmA. Is that how it’s supposed to look? I thought it used to be named “ENFOLD…”

    Thanks for your help!
    Nancy

    #441632

    Hey Munford!

    1. That customization is not available in a child theme currently. We may see it get added to the framework in a future update though.

    2. Not sure why it says THEMENAME there instead of Enfold. Perhaps it’s from your membership plugin? Try uploading a fresh copy of the theme and deactivate all plugins.

    Regards,
    Elliott

    #442876

    Hi Elliot –
    I disabled my plugins and loaded a new version of enfold via ftp but am still seeing the THEMENAME instead of ENFOLD in the menu settings. I am using a child theme. Any ideas? It’s being flagged when I use WP-debug.
    thanks
    n

    #443493

    Hi!

    Please post the login details here. We would like to check it. The mobile menu modification is not going to work on a child theme. You need to add it on the parent theme’s function.php.

    Regards,
    Ismael

    #443597
    This reply has been marked as private.
    #443840

    Hey!

    Can you please post the link to the topic where i provided you the code Nancy?

    Best regards,
    Yigit

    #443853
    #445606

    Hey Nancy!

    Sorry for the late reply! Can you please show us the topic where you got the first part of the code and not the one that shows how to add avia.js file to child theme?

    Regards,
    Yigit

    #445609

    I think it was this:
    #363311

    I think I also followed a link from a search on the support

    #447742

    Hey!

    please post a link instead of the #number, as we can’t find it otherwise.

    Cheers!
    Andy

    #447771
    #448781

    Hi Nancy!

    What was the link to your site?

    Regards,
    Josue

    #448958
    This reply has been marked as private.
    #449861

    Hey!

    I tested the mobile menu modification on my installation and it works fine. It doesn’t change the theme location name so it’s either a third party plugin or a custom modification in your installation. Please try to deactivate all plugins then test it again. If you’ll give us your permission, we would like to deactivate the plugins to test which plugin is causing the issue. You can also edit this code:

    register_nav_menu($key, THEMENAME.' '.$name);
    

    Replace it with:

    $theme_name = get_current_theme();register_nav_menu($key, $theme_name.' '.$name);
    

    Cheers!
    Ismael

    #449893
    This reply has been marked as private.
    #450412

    Hi!

    The mobile menu is working. It doesn’t really affect anything on the site, it’s just that the child theme doesn’t recognize the THEMENAME constant. Did you try the solution provided above? https://kriesi.at/support/topic/mobile-menu-33/#post-449861

    Cheers!
    Ismael

    #452766
    This reply has been marked as private.
    #453607

    Hey!

    Keep a backup of everything, before you do, then go to your ftp, delete the old enfold and upload a new one.

    Again, be sure to have a backup!

    Best regards,
    Basilis

    #453663

    OK I did that and now am getting an error on the site that says:

    Broken Themes
    The following themes are installed but incomplete. Themes must have a stylesheet and a template.
    Name Description
    Enfold Child The parent theme is missing. Please install the “enfold” parent theme.

    What do I do to fix this? I seem to have lost the child theme in the options: http://imgur.com/ICzvHc9
    thanks…
    Nancy

    #455027

    Hi!

    Can you please post us the childtheme style.css file header, so we can see that everything is correct?

    Best regards,
    Basilis

    #455028

    /*
    Theme Name: Enfold Child
    Description: A Child Theme for the Enfold WordPress Theme. If you plan to do a lot of file modifications we recommend to use this Theme instead of the original Theme. Updating will be much easier then.
    Version: 1.0
    Author: Kriesi
    Author URI: http://kriesi.at
    Template: enfold
    */

    /*Add your own styles here:*/

    /*.iconbox .iconbox_content .iconbox_content_title {
    font-size: 40px!important;
    }*/

    .iconbox {
    opacity: 0.7;
    }

    /*table styling itinerary*/
    td {
    border-bottom-color: #ffffff!important;
    border-right-color: #ffffff!important;
    border-top-color: #ffffff!important;
    border-left-color: #ffffff!important;
    }

    #455393

    Hi!

    Why did you override the theme? Like I said on my previous post, it doesn’t affect anything on the theme. Please review the post here: https://kriesi.at/support/topic/mobile-menu-33/#post-449861

    You can find this line in the mobile menu modification:

    register_nav_menu($key, THEMENAME.' '.$name);
    

    Replace it with:

    $theme_name = get_current_theme();register_nav_menu($key, $theme_name.' '.$name);
    

    That should fix the theme name issue.

    Cheers!
    Ismael

    #456794

    thanks

Viewing 23 posts - 1 through 23 (of 23 total)
  • The topic ‘mobile menu’ is closed to new replies.