How to structure a plugin
This isn’t a question about how to build a WordPress plugin. Rather, what, if any, guides could be applied to how to put together the file architecture of any plugin.
This isn’t a question about how to build a WordPress plugin. Rather, what, if any, guides could be applied to how to put together the file architecture of any plugin.
I want to organize themes like:
I’ve done my share of searching, but apparently my search-fu is failing me, because I haven’t found anything that really seems to fit my circumstance. Also, I don’t want to just try random solutions and end up bricking everything.
So, i’m trying to find out a way to use two separate upload folders, being the default one wp-content/uploads for general media uploads, and another one say wp-content/custom for one specific type of attachments (PDF files attached to one specific post_type).
I have number of legal documents of different formats / layout that I need to display on a WordPress site, however I don’t want to have them as individual page-pagename.php files in the root of the project folder. I know I can use get_template_part() and load in different template files, but this won’t really help me because the files are all of differing styles.
This code is used to get the directory of the current plugin: plugin_dir_url( __FILE__ ).