Targeting or removing text and images in WordPress posts

I have a WordPress site which displays the post’s content using

<?php the_content(); ?>

there are images and text in the content which all get outputted in < p > tags

I want to style the margins/padding of the images and text differently. I can target the images but when I apply styles to the text, they affect the images as well.

The only options I can think of are using – margins (but that will cause problems later) and putting all text in block quotes but that will remove that functionality for future use.

can i ‘pull out’ the images and/or text out of the_content and display them another way?


Source: html

Leave a Reply