• I use this plugin. This is a nice plugin. I want to created a folder in theme directory, where located in menu icon plugin folder. when user install theme, that time this plugin automatically install. I write a function in function.php. but the problem is that plugin not install properly. the reason is that plugin folder path is define in plugin directory. so how can I change all the path in my theme directory? I think that if theme directory path added properly, that will work.

    Please help me which file need to change path. suppose my theme path is “theme/riju/test-plugin/”.

    thanking you.

    https://www.ads-software.com/plugins/iconic-navigation/

Viewing 1 replies (of 1 total)
  • Plugin Author indybook

    (@indybook)

    Hi rijuroy, Thanks for contacting!
    I’m not sure I got it right, theoretically you can’t activate a plugin from a theme directory. May be try changing the plugin path with
    wp_register_plugin_realpath( $your_plugin_file )
    Have you looked at that yet? I never played with this one and have no clue what are the possible downsides, might be a very bad idea to cheat on WP_PLUGIN_DIR )
    May be you could just add your plugin normally and then use TGM class to recommend users for activation.
    Check it here.
    If you simply need to know a plugin path, this should work:

    include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
      $plugins = get_plugins();

    and then filter them against global $wp_plugin_paths by ‘TextDomain’.
    Iconic navigation has ‘TextDomain’ property and it matches its folder and main file names, just in case. I find it handy when those names match so you don’t need more strings to vars )
    Again if you need the iconic-navigation icons file simply copy it to your theme and include.
    Let me know if it helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Installing menu icon in theme folder’ is closed to new replies.