Title: [Plugin: Smarty for WordPress] Plugins Not Working
Last modified: August 20, 2016

---

# [Plugin: Smarty for WordPress] Plugins Not Working

 *  [Metzen](https://wordpress.org/support/users/metzen/)
 * (@metzen)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-smarty-for-wordpress-plugins-not-working/)
 * On a default install (after creating the directories in the theme) when I do 
   a simple test it fails with “unknown modifier”.
 * {$name|upper}
 * If I copy the modifier file from:
    plugins/smarty-for-wordpress/plugins/modifier.
   lower.php
 * to the theme plugins folder then it works.
 * [http://wordpress.org/extend/plugins/smarty-for-wordpress/](http://wordpress.org/extend/plugins/smarty-for-wordpress/)
 * And thanks for a great plugin! I really hope this is maintained and kept current
   because Smarty + WordPress is a powerful combination.

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

 *  Thread Starter [Metzen](https://wordpress.org/support/users/metzen/)
 * (@metzen)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-smarty-for-wordpress-plugins-not-working/#post-2144146)
 * A little more information on this:
 * If I copy the files from the plugins/smarty-for-wordpress/plugins/ folder to 
   the theme plugins folder, some things work, but other things cause a “Cannot 
   redeclare” error because it’s trying to include the function in both places.
 * So having all files in either place or both places doesn’t work.
 * I think it ~may~ have something to do with only the theme plugin directory being
   declared, so maybe something like this would work:
 * $smarty->plugins_dir[] = ‘[wordpress-path]/plugins/smarty-for-wordpress/plugins/’;
   
   $smarty->plugins_dir[] = get_theme_root().”/”.get_template().”/plugins”;
 * But so far no luck. I would love a solution to this since I can’t really proceed
   without it.
 *  Thread Starter [Metzen](https://wordpress.org/support/users/metzen/)
 * (@metzen)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-smarty-for-wordpress-plugins-not-working/#post-2144192)
 * OK, I think I figured it out.
 * About 4 places in smarty-for-wordpress.php there is this line:
    $smarty->plugins_dir
   = get_theme_root().”/”.get_template().”/plugins”;
 * That is overwriting the directory in the plugin folder (smarty-for-wordpress/
   plugins/) so that ONLY the theme plugins folder is getting checked.
 * Instead it should ~add~ a plugin folder (so both folders are read) by having 
   the square brackets:
    $smarty->plugins_dir[] = get_theme_root().”/”.get_template().”/
   plugins”;
 * After I made that change everything works as expected (I also had to clear my
   theme/templates_c/ folder).
 * Thanks again for a great plugin!

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

The topic ‘[Plugin: Smarty for WordPress] Plugins Not Working’ is closed to new 
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/smarty-for-wordpress.svg)
 * [Smarty for Wordpress](https://wordpress.org/plugins/smarty-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smarty-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smarty-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/smarty-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smarty-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smarty-for-wordpress/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [Metzen](https://wordpress.org/support/users/metzen/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-smarty-for-wordpress-plugins-not-working/#post-2144192)
 * Status: not resolved