Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 6 years ago.
Improve this questionI've inherited a wordpress website I need to maintain. Despite having upgraded it to the latest version (5.03), and having changed the theme, there seems to be some customisations which survived. These seem to be CSS related, affecting the general page template, as well as a specific plug-in. I would like to remove these customisations.
I am not a wordrpess dev, any pointers as to where to look would be appreciated.
Closed. This question is off-topic. It is not currently accepting answers.Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed 6 years ago.
Improve this questionI've inherited a wordpress website I need to maintain. Despite having upgraded it to the latest version (5.03), and having changed the theme, there seems to be some customisations which survived. These seem to be CSS related, affecting the general page template, as well as a specific plug-in. I would like to remove these customisations.
I am not a wordrpess dev, any pointers as to where to look would be appreciated.
When you inspect elements on the affected pages, it should tell you which CSS file is enforcing the rule. If the file is somewhere inside /wp-content/plugins/
then a plugin is adding them and you can either disable that plugin or see whether they have properly enqueued the CSS. If inside the plugin the style is added like this:
wp_enqueue_style(...);
and you need the plugin's functionality, just not the styles, you can create a child theme and inside its functions.php
file add
add_action('wp_enqueue_scripts', 'wpse_325875_dequeue_plugin_css');
function wpse_325875_dequeue_plugin_css() {
wp_deregister_style(...);
}
(replacing the ... with the same name the original plugin uses, so that it dequeues that particular file.)
Another possibility is that the dev before you may have modified Core files, which would be somewhere inside /wp-content/admin/
or /wp-content/includes/
. Usually updating Core fixes this type of problem, but you can also manually download the .zip file from wordpress and overwrite your wp-admin
and wp-includes
folder. (Be careful not to overwrite wp-content
as that contains all of your plugins as well as media uploads, like jpgs and pdfs.) That will ensure you're using non-modified Core files.
As with any changes, make sure you have a complete backup of both files and database before making changes. :)
You can verify by turning off all the plugins one by one. If issue is still present then you can comment the css file one by one from the functions.php. You can use the sign "//" double forward slash for commenting the php code.
It's hard to say more without seeing it, but you could also check in Appearance > Customize > Additional CSS
. This is the only place you can make changes (within the WP Admin, that is) that will persist through a theme update or switch (note that these theme changes are saved per-theme and would only return when you switched back to that theme).
Otherwise it would have to be a plugin or a core code change, as WebElaine mentioned.