• Hello,

    I have done everything as you said up to editing the functions file. I assume that is in the theme folder? I am using a purchased theme and when I open the functions file it says “

    /**
    * Functions and definitions.
    *
    * PLEASE DON’T MODIFY THIS FILE.
    * Use the provided child theme for all your modifications.

    Now I am lost!, I have now attached the themes child theme but not activated it, should I?
    Next I do not understand where/how to put the path to the nav-menu-v4.php file. MY FTP directory lists it here, /public_html/wp-content/themes/advanced-custom-fields-nav-menu-field

    This is my first attempt at web design and WP if you are wondering…

    Regards

    https://www.ads-software.com/plugins/advanced-custom-fields-nav-menu-field/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey firstforward,

    You shouldn’t hard-code your location, just get a relative path from the functions.php to your nav-menu-v4.php. You should also put your ‘advanced-custom-fields-nav-menu-field’ in the plugins folder or inside your theme’s folder — just not at the root /wp-content/themes/ folder.

    Be sure to adjust $relativePath to whatever it takes to get to your file.

    /**
     * Assumes we are in functions.php, importing the file from inside the plugins directory.
     *
     *  /wp-content/themes/my_theme/functions.php <- you are here
     *  /wp-content/plugins/advanced-custom-fields-nav-menu-field/nav-menu-v4.php
     *
     */
    
    // __FILE__ is functions.php and now we'll have an absolute path to its folder
    $functionsDir = dirname(__FILE__);
    $relativePath = '/../../plugins/advanced-custom-fields-nav-menu-field/nav-menu-v4.php';
    include_once($functionsDir . $relativePath);

    Cheers

    Plugin Author Faison

    (@faison)

    Hi firstforward,

    This plugin should just be installed as a plugin, through the plugin installer or via FTP. Those instructions are being updated with the next version of this plugin (which also adds ACF v5 support). You can check out the next version on github: https://github.com/Faison/ACF-Nav-Menu-Field/tree/2.0.0

    Sorry about the confusion.

    Thanks,
    Faison

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I am stupid….Help’ is closed to new replies.