Hi Team!
Im wandering how can I put a “Read More” button in the overlay (fixed) of the masonry blog
I show you what im doing now in the web (left) and what i want to do (right) in the attach image…
Thanks!
Hey Victor!
can you provide us a link to your site showing the elements in question please? we need to be able to inspect the elements.
Best regards,
Andy
Sure!
http://www.farmacia-amado.com.mialias.net/
I want a Read More button instead of the excerpt, but I want it just in the homepage, because im using the masonry element in other pages in a different way (and is correct for my design):
Thanks!
Hi!
Please add this in the functions.php file:
add_filter('avf_masonry_loop_prepare','avia_change_default_link', 10, 2);
function avia_change_default_link($loop, $entries)
{
foreach($entries->posts as $key => $entry)
{
if($entry->post_type == "post")
{
$more = "<br /><span class='masonry-more-link-arrow'>".__('Read more','avia_framework')."</span>";
$loop['content'] = avia_backend_truncate($entry->post_content, apply_filters( 'avf_masonry_excerpt_length' , 60) , apply_filters( 'avf_masonry_excerpt_delimiter' , " "), "…", true, '') . $more;
}
}
return $loop;
}
Style it with the following css:
.masonry-more-link-arrow {
color: blue;
}
.masonry-more-link-arrow:hover {
color: red;
}
Best regards,
Ismael
Awesome!! thank you very much!!
Hey!
Glad we got it short out!
Please do let us know if you need anything else, we will be more than happy to help.
Cheers!
Basilis