Title: Plugin folder definition
Last modified: August 31, 2016

---

# Plugin folder definition

 *  Resolved [Birgir Erlendsson (birgire)](https://wordpress.org/support/users/birgire/)
 * (@birgire)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/plugin-folder-definition/)
 * Hi, I just wanted to mention that not everyone is using this kind of plugin folder
   structure:
 *     ```
       $this->plugin_folder = get_bloginfo('wpurl') . '/' . PLUGINDIR . '/' .
       dirname(plugin_basename(__FILE__)) . '/';
       ```
   
 * It would probably be better to define it as:
 *     ```
       $this->plugin_folder = plugin_dir_url( __FILE__ );
       ```
   
 * This is e.g. the case for users using the wp-skeleton structure.
 * Thanks.
 * [https://wordpress.org/plugins/zigwidgetclass/](https://wordpress.org/plugins/zigwidgetclass/)

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

 *  [foxydot](https://wordpress.org/support/users/foxydot/)
 * (@foxydot)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/plugin-folder-definition/#post-7276236)
 * Better yet, use the constants:
 * [https://codex.wordpress.org/Determining_Plugin_and_Content_Directories#Constants](https://codex.wordpress.org/Determining_Plugin_and_Content_Directories#Constants)
 *  Thread Starter [Birgir Erlendsson (birgire)](https://wordpress.org/support/users/birgire/)
 * (@birgire)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/plugin-folder-definition/#post-7276238)
 * [@foxydot](https://wordpress.org/support/users/foxydot/)
 * I think I mostly agree with Kaiser here:
 * [http://wpkrauts.com/2015/the-guide-to-wordpress-path-and-urls/](http://wpkrauts.com/2015/the-guide-to-wordpress-path-and-urls/)
 * regarding the WP constants:
 * > Those constants are the bottom layer and therefore are not meant to be used
   > directly.
 *  [foxydot](https://wordpress.org/support/users/foxydot/)
 * (@foxydot)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/plugin-folder-definition/#post-7276239)
 * I stand corrected! Thanks for the resource here. I forgot about content_url().
   But overall, yeah, making it self-referential is preferred when possible.
 *  [foxydot](https://wordpress.org/support/users/foxydot/)
 * (@foxydot)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/plugin-folder-definition/#post-8610556)
 * Either way, six months and 4 new releases later, and this still isn’t corrected.
   It’s generating 404s on my sites. I’m thinking I might fork the plugin since 
   it seems that all the new releases do is “confirm WPx.x compatibility.”
 *  Plugin Author [zigpress](https://wordpress.org/support/users/zigpress/)
 * (@zigpress)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/plugin-folder-definition/#post-9238777)
 * I don’t monitor these forums – support requests should be posted to the plugin’s
   page on zigpress.com . However you’ll be pleased to know that this issue is now
   fixed in version 0.8.

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

The topic ‘Plugin folder definition’ is closed to new replies.

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

 * 5 replies
 * 3 participants
 * Last reply from: [zigpress](https://wordpress.org/support/users/zigpress/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/plugin-folder-definition/#post-9238777)
 * Status: resolved