Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter sophcb

    (@sophcb)

    Hi everyone,

    Just in case anybody else stumbles across this problem, I’ve managed to find a fix ??

    I tried all the plugins I could find to add different menus to different/external WP pages. Something in my theme must have been blocking them from working – Then I tried this one: https://www.ads-software.com/plugins/different-menu-in-different-pages

    To add a different menu on a separate WP page, you can do the following:

    1) Firstly, you will need to register your menu so it shows up in your Backend (Appearence > Menus). To do this, copy & paste this bit of code into your THEMES ‘functions.php’ file, normally found in wp-content > themes > ‘themes folder name’.. then scroll down and find “functions.php”.

    2) Open this file and paste this in at the end:
    function register_my_menu() {

    function register_my_menu() {
      register_nav_menu('choose_any_name_here',__( 'My Menus Name' ));
    }
    add_action( 'init', 'register_my_menu' );

    Where I’ve put ‘choose_any_name_here’, feel free to input any name you’d like for your menu… i.e.. Gallery Menu, New menu.. something you can remember/recognise. Make sure there are no spaces here.
    Where I’ve put ‘My Menus Name’, again, add a relevant name you’d like to use — This part will show up in your backend ‘Menus’ section.

    3) Save your file and re-upload it via your FTP, (I use Filezilla). I recommend clearing your browsers cache after re-uploading, (or you can install Total Cache plugin and use this).

    4) When you go onto your backends Appearence > Menus, your new menu will now show at the bottom of the page, where it says ‘Theme locations’ in the Menu Settings.

    5) Now you’ve registered the menu you want to use, install this WP plugin: https://www.ads-software.com/plugins/different-menu-in-different-pages – I did this via the ‘Plugins’ section in the backend, search for ‘Different menu in different pages’. Click the install button then ‘Activate’. Done!

    6) To set it up to show your menu, Go to then new ‘DuoGeek’ tab on your backends left menu, then select ‘Menu Manager’.

    In the Menu Manager, paste the name you chose for your menu into the’Menu Location’ and ‘Menu Description’ fields here, i.e. whatever you put as ‘choose_any_name_here’, if we were to use the php example above.

    7) Hit ‘Save Location’. This part is now done.

    8) Under the ‘Pages’ tab, select ‘Edit’ on whichever page you would like to add the new menu to.

    9) In the top-right side of the ‘Edit Page’ screen, there will be a new small box that says “Menu Manager”. – (If you cannot see this, click the ‘Screen Options’ link at the top-right of the page, and select the check box for ‘Menu Manager’).

    10) In the Menu Manager box, check the box which says ‘Enable Menu Replacement’. Next, select the menu you wish to be replaced in the drop-down box, followed by finally selecting the new menu you wish to replace it with in the last drop-down box.

    11) Click the blue ‘Update’ button in the Publish section ??

    12) Last but not least, go to Appearance > Menus and make sure the menu you are wanting to display is selected. Below the area for Menu Structure, look for the ‘Theme locations’ in the lower Menu Settings section. Simply check the box for the new registered menu, i.e. ‘My Menus Name’, (if we are using the example above).

    Once you have checked that box, hit the blue ‘Save Menu’ button to the right, and Boom! Done! ??

    Really hope this helps someone as it’s been driving me nuts for days! ??

    p.s.. I’m running the latest version of WP (4.6) and the plugins compatibility works no problem.

    Best regards,

    Sophie

    Thread Starter sophcb

    (@sophcb)

    Very odd. Not sure why it matters if they are free or not

    In all honesty no I don’t really understand why help is restricted, the theme developer has never replied to me so I thought this might be a good place for WordPress help. I need guidance on how I’m supposed to write some WordPress syntax, if I’m doing it right, and believed this was a place where fellow developers would help, (who have much more knowledge than I do). Very disappointed and feel rather sad to have written out such a long post asking for help just to be told this.. wits end :'(

    I will try another forum where some developers might help, maybe StackExchange WordPress area. It’s odd I have to go to another site to do this, will hopefully get even just a rough idea of how to fix this from there..

Viewing 2 replies - 1 through 2 (of 2 total)