Hello JustCarmen,
Your suggestion is a very good one and I’ll implement it in a future Menubar version.
The patch to apply is very simple. Open wpm-main.php, locate the line
$wpm_options->templates = 'menubar-templates';
and replace it with
// $wpm_options->templates = 'menubar-templates';
$wpm_options->templates = get_stylesheet_directory_uri ();
Done!
Thank you for putting me on the right track, but your solution didn’t work because the created url was wrong. The plugin was searching the template in the theme directory as a subdirectory of the plugin directory.
I took me some puzzling but I got it working by changing two other lines in wpm_main.php:
Assume you put a folder in your themefolder that is named ‘menubar-templates’
Than you can leave the line “$wpm_options->templates = ‘menubar-templates” as it is (you only have to change this if you change the folder name also).
The two lines below has to be changed:
1. Change this line:
$wpm_options->templates_url = plugins_url ($wpm_options->templates);
Into this line:
$wpm_options->templates_url = get_stylesheet_directory_uri() . '/' . ($wpm_options->templates);
2. Change this line:
$wpm_options->templates_dir = WP_PLUGIN_DIR. '/'. $wpm_options->templates;
Into this:
$wpm_options->templates_dir = get_stylesheet_directory() . '/'. $wpm_options->templates;
[Please post code snippets between backticks or use the code button.]
In that case it is working in the backend as well as in the frontend of the site.
And thank you for putting this option in the next version of menubar!
Thank you for your feedback. Sorry I didn’t test my patch, but I’m glad you were able to move the templates anyway!