Archived topic
How to edit HTML in the same way I can edit CSS?
6 replies · Started by James on March 13, 2020
I'm trying to change the order of elements in a post.
I currently have it looking as follows:
<div class="featured-image page-header-image-single ">
<img width="1283" height="1268" src="https://.com/wp-content/uploads/2020/03/1.-LOGO.jpg" class="attachment-full size-full" alt="Studio Wolle Featured image" itemprop="image">
</div>
<div class="entry-content" itemprop="text">
<h1>XXXXXX</h1>
But I would like the entry-content to appear above the featured-image. I can change this in inspect element by simply copying and pasting the HTML in the position I want it. Obviously this doesn't make changes permanent. How am I able to edit the HTML so that the changes are permanent?
Hi there,
just to be clear - are you wanting the featured image to appear after all of the entry-content container ? so effectively at the end of the post.
Hi David.
The elements on the page are currently as follows:
(1) div.featured-image-page-header-image-single
(2) h1.has-text-align-left (within the entry-content class)
(3) h2.strong
I would like to change the order so that 2 is above 1. So the post would then be:
TEXT (2)
IMAGE (1)
TEXT (3)
If its just below the themes H1 you require it then this:
Customizer > Layout > Blog --> Featured Images select Posts, here you can change the featured image location to Below Title
If you want it to be within the entry content below a H1 added in the editor then things will get a little more complicated. Let me know.
Yes it's within the entry content but only a part of it (the h1 above)
Never mind I've found a better way to deal with this. Thanks anyway!
Sorry if i misunderstood the requirement. Glad to hear you found the solution.