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 ):
<div class="container section-title-container">
<h1 class="section-title section-title-center">
<b></b>
<span class="section-title-main">Qualitätsmerkmale der Dänischen Kerzen</span>
<b></b>
</h1>
</div>
The site uses the theme Flatsome.
Any help would be greatly appreciated!
4
Answers
If you still have Gutenberg editor this works.
Click all pages – > find your page and click Gutenberg editor -> top-right side click three dots -> Code Editor.
the "b" tag created by your Theme developer. it has some styles in your theme.
he/she styled the "section-title b" tag for making the title centered. either it is not a standard way to make a title text centered. you can try this way:
put this code into your css file and see the result with clearing your cache by ctrl + F5:
Those tags actually are being used by the theme author for styling purposes, so you can’t remove or hide them without modifiyng the look of the page. Notice that they have the following styles assigned:
They represent the thin lines at both sides of the titles.
So, even they are empty, they represent a visual element in your page style.
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.
The Code After Cleaning Unused Tags