JetPack Mobile Theme Custom Menu ‘Undefined variable: menu_id’ Issue

Solving: ‘Undefined variable: menu_id’ in JetPack Mobile Theme Custom Menu

Hi, this is a ‘Quick & Dirty’ but working Fix for the ‘Undefined variable: menu_id’ Issue in JetPack Mobile Theme Custom Menu setup.

 - Featured

  1. Edit the Main functions.php
    And this procedure need to be Repeated after each Plugin Update…
    Here I shows you how to do it by the Nix Command Line:

    sudo nano [SITEROOT]/wp-content/functions.php

    Just Replace [SITEROOT] with your Site’s Root Path.

  2. Search & Change
    The Line containing:

    return array( 'primary' => apply_filters( 'jetpack_mobile_theme_menu', $menu_id ) );

    Ctrl+w to Search for ‘$menu_id’.
    And Change in:

    return array( 'primary' => apply_filters( 'jetpack_mobile_theme_menu', '0' ) );

    Finally, Ctrl+o to Save changes or Ctrl+x to Save & Exit.

Leave a Reply

Your email address will not be published. Required fields are marked *