Have to refresh twice to see changes (3 posts)

  1. SLAFmultimedia
    Posted 2 years ago #

    Hi you reading,

    I'm presently doing a website for someone, and his website has 2 sections. I want to change the main_navigation menu in relation to the section the user is currently on.

    I did this by creating a child-theme and editing the header-main-menu.php file. Here's how I do it:


    if(!$data['ubermenu']) {
    $sectionname = get_permalink();
    $menu_id = (strpos($sectionname, 'technical-furniture') !== false ? 3 : 8);
    $mods = get_option("theme_mods_avada-child");
    $mods['nav_menu_locations']['main_navigation'] = $menu_id;
    update_option("theme_mods_avada-child", $mods);

    echo $main_menu;
    } else {
    uberMenu_direct( 'main_navigation' );

    I don't know why, but I have to refresh twice for the menu to change.FYI, I did disable the cache in the wp-config.php file by writing :

    define('DISABLE_CACHE', true);

    at the end of the file.

    Do you guys have any idea what causes this or how to troubleshoot myself?

    Thanks thank you for taking the time to read my question.


  2. esmi
    Forum Moderator
    Posted 2 years ago #

    I'm sorry but as you appear to be using a commercial parent theme, you need to seek support from the theme's developer/vendor. We do not have access to, nor do we support, commercial products here.

  3. SLAFmultimedia
    Posted 2 years ago #

    Oh sorry,

    I thought it was more of a WordPress issue.

Topic Closed

This topic has been closed to new replies.

About this Topic