0

I'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 as off-topic by Michael, Jacob Peattie, cjbj, Dave Romsey, fuxia Jan 24 at 9:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "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?" – Michael, Jacob Peattie, cjbj, Dave Romsey, fuxia
If this question can be reworded to fit the rules in the help center, please edit the question.

2

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.org 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. :)

0

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.

-1

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.

  • Additional CSS is saved per-theme, and would not persist if the user changed theme. – Jacob Peattie Jan 18 at 0:28
  • I should have pointed that out, I was trying to describe that a themes' changes would get saved but didn't mean to suggest that they would persist into the next theme. Will edit. – rsigg Jan 21 at 16:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.