Hello, we want to move the published date and author name section up under the title.
I checked similar threads in the forum and tried the codes, but it didn’t work.
Hi menainfosec,
Please add this code in functions.php of your child theme, if you don’t have a child theme then you can use the plugin called WPCode to insert this code snippet:
function move_postmeta() {
?>
<script>
window.addEventListener('load', function() {
var postMetaInfos = document.querySelector('.single-post .post-meta-infos');
var postTitle = document.querySelector('.single-post .entry-content-header .post-title');
if (postMetaInfos && postTitle) {
postTitle.parentNode.insertBefore(postMetaInfos, postTitle.nextSibling);
}
});
</script>
<?php
}
add_action('wp_footer', 'move_postmeta');
Then go to Enfold > General Styling > Quick CSS, then add this CSS Code:
.html_modern-blog #top .post-entry .post-meta-infos {
margin-top: -20px;
}
.html_modern-blog #top .post-entry .blog-categories {
top: -15px;
}
Hope it helps.
Best regards,
Nikko
Hi Nikko,
It worked! Thank you for your help.
Hi,
Glad Nikko was able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.
Best regards,
Mike