Articles of directory

Is it possible to place custom post type files inside a folder in theme directory?

I have created a custom post type called customtype. From my understanding the template file for it would be single-customtype.php which is placed inside wp-content/themes/mytheme. Can I place the single-customtype.php file inside a custom folder in the theme directory? It’s not critical but would help with theme files organization. This is what I want to […]

Disable to create folders for every years and months in uploads folder

How can I disable to create folders for every years and months in uploads folder? I mean there is a lot of folder under “wp-content/uploads”, and the majority of them are empty. Why create WP these folders? Thanks!

Accessing WordPress installation in its own directory at domain root

I am using this tutorial Giving WordPress Its Own Directory to launch a WordPress (installed in a sub folder called wordpress) by using example.com instead of example.com/wordpress. It says to copy index.php to your root folder and change the relative path to wp-blog-header.php accordingly. However, my folder structure is a little complex: To access site […]

Change the actual (or viewable) WordPress directory structure

I like the simplicity of wordpress and all it has to offer, but for security purposes I would like to change the actual (or viewable) directory structure of my site. The install has a set of files that everybody who’s familiar with wordpress will know about. I have read about some security measures some where […]

Is there any way to allow a plugin to write over a previous version?

When installing a plugin, it will not install if the directory to which it is attempting to install already exists. This means that users of our plugin must first manually deactivate and delete the plugin. Is there any way to forcibly overwrite the directory or to deactivate the plugin and delete the directory at installation? […]

How would you detect if WordPress is installed in a subdirectory (not root)?

I want to check if a WordPress installation is working from a subdirectory. Common methods to achieve this are listed here: https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory these usually involve changing an index file and requiring WordPress main file from there, perhaps changing rules in htaccess if using Apache – there’s no setting up constants from what I can see […]

Right permissions to WordPress directory

Knowing that not all files and folders have the same permissions, What are the right permissions in order to avoid hacker attacks and to allow the sites updates and upgrades? My site is installed on Linux Debian 7 Note. My mother language is Spanish, so I apologize if my question is not fully understood.

Components used in Themes and Plugins: How to get file URL?

In my projects I have some components which I use in a lot of custom Plugins as well as in some custom coded Themes like e.g. admin image or video selectors. Those I am holding in custom git repositories. However as those components are used in both – themes and plugins – I always have […]

Depth > 2 possible with multisite?

Is there anyway to create blogs with 2 depths using multisite? I want to have an installation in root and blogs with 2 depths. Something like: / – WP installation: root aggregate /foo – WP installation: aggregate for a topic /foo/item – WP installation: blog for an item Trouble is that multisite only goes in […]

issues including a file from a plugin directory

I have a processForm.php in theme directory that does what it says. I am trying to include a file (which i need in order to run a specific function in processform.php) from a plugin directory and have been unable to do so. As suggested in first solution in this thread I tried : include( plugin_dir_path( […]