i have a problem with the posts of wordpress. Using the code embed function of an external blog publishing automatically on wordpress, the html code messes up my styling.
I do have the following code:
<div class="entry-content">
<div style="width:450px;margin:0 auto">
<div style="position:relative;">
<a target="_blank" href="DIFFERENT VARIABLES">
<img width="???" alt="DIFFERENT VARIABLES" src="DIFFERENT VARIABLES" title="DIFFERENT VARIABLES" height="???" />
</a>
</div>
</div>
<p><br/>
<div style="text-align:center"><small>SEVERAL <a>-TAGS</small></div>
</div>
The goal is to get rid of the second <div>
with the style attributes and to get rid of the <p><br/>
.
The best way would be a function for the function.php cause I do have lo of posts.
Can anyone help me please? I’m good enough to do some html coding, but this is far beyond my skills.
Add this to your functions.php.
Have you tried a jQuery command to remove it, such as
jQuery('.entry-content br').remove()
?At the php level, you could use
the_content
filter to change the contents.