Hi support team,
Is it possible to add an extra colored box above the images in the masonry gallery?
Also, if it is possible, can you then show the title in that box while still having the caption beneath the images?
Best regards,
Hi saraclementdk,
Could you provide us with a link to the site in question so that we can take a closer look please? A screenshot highlighting what you would like to achieve would help as well.
Best regards,
Rikard
Hi Rikard,
Thank you for your quick response. Yes, of course. (see link in private content)
The third picture shows what we would like to achieve, if possible :).
Best regards,
Hi!
Thank you for the link. Please add this in the functions.php file:
// move masonry title
add_action('wp_footer', 'ava_custom_script', 10);
function ava_custom_script(){
?>
<script>
(function($) {
$('.av-masonry-entry').each(function() {
var title = $(this).find('.av-masonry-entry-title'),
inner = $(this).find('.av-inner-masonry');
$(title).prependTo(inner);
});
}(jQuery));
</script>
<?php
}
And the following code in the Quick CSS field:
.av-masonry-entry .av-masonry-entry-title {
position: absolute;
top: 0;
z-index: 1000;
width: 100%;
text-align: center;
background: blue;
padding: 10px;
}
Regards,
Ismael
Hi Ismael,
Thank you so much. It works like a charm. Have a nice day :)
Best regards,
Hi!
Glad you got it short out.
Please do let us know if you need anything else, we will be more than happy to help
Cheers!
Basilis