Hi @fcwhitford,
The plugins in WordPress by default, are not able to detect a custom folder name that replaces the wp-content folder. In order to use a custom folder, you need to define its name in the wp-config.php file. WordPress allows you to define the name of the custom wp-content folder with the help of the WP_CONTENT_FOLDERNAME, WP_CONTENT_DIR, or WP_CONTENT_URL symbol. For more information, please visit on how to rename wp-content folder: https://wpsecurityninja.com/replace-or-rename-wp-content-folder/#How_to_Rename_WP-Content_Folder. If you had replaced the wp-content folder, you can look at this guide: https://wpsecurityninja.com/replace-or-rename-wp-content-folder/#How_to_replace_the_WP-Content_Folder.
If I may be missing, please elaborate further.
Kind regards,
Blaise.
hi @fcwhitford
Just to add to what Blaise said, FooGallery builds up the path to the CSS file using the plugin_dir_url function which is the correct function to use, as the stylesheets are within the plugin folder. Under the hood, this function uses WP_PLUGIN_URL and that is defined as
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' );
So it should be working for you is those are defined correctly.
This is what I had in wp-config.php:
define (‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/files’);
define (‘WP_CONTENT_URL’, ‘//exhibition.landlps.org.uk/files’);
define (‘WP_PLUGIN_DIR’, dirname(__FILE__) . ‘/plugins’);
define (‘WP_PLUGIN_URL’, ‘//exhibition.landlps.org.uk/wp43/plugins’);
but the missing url was something like
https://exhibition.landlps.org.uk/files/plugins/foogallery/…..
I’m not sure the rationale for my file structure was very sound anyway. The main purpose was to not use default file locations because that’s what hackers target.