Skip to content
Advertisement

How to remove unused tags on my WordPress site?

I have the following site: https://www.daenischer-kerzenshop.de/ If i look at the source code via the browser, I can detect empty tags.

Does anyone happen to know why they are generated and how I can remove them? I have searched all possible files and removed all code that could possibly cause this.Unfortunately I could not find a usable plugin either.

Here is an example (Browser-> View source code-> line: 1465 ):

JavaScript

The site uses the theme Flatsome.

Any help would be greatly appreciated!

Advertisement

Answer

Using str_replace() Method

This is the simplest and the easiest method to exclude any unused tags or text. Just add the below code and see the magic.

JavaScript

The Code After Cleaning Unused Tags

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement