Tagged: blog slider, title position
Hello,
I’m using the blog slider to retrieve the latest article in different pages.
Here you can see the page and here is the question:
I would like to have the title of each article ABOVE the image, not under, like it is now.
Is it possible?
Thanks
Hey SurigliaStudio,
Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:
function blog_title_above_image() { ?>
<script>
window.addEventListener('DOMContentLoaded', function() {
(function($){
$('.slide-entry').each(function() {
$(this).find('.entry-content-header').insertBefore( $(this).find('a.slide-image'));
$(this).find('.av-vertical-delimiter').css('display','none');
});
})(jQuery);
});
</script>
<?php
}
add_action( 'wp_footer', 'blog_title_above_image', 99 );
If you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
and ensure that it is activated, then add the above code and save.
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
Please see the screenshot in the Private Content area of the expected results.
Best regards,
Mike