Hi Team,
I have a Masronry Element for Blog posts in two placed on this site: https://fortrockclimbing.com/
— Home Page, most recent posts – Here’s a screenshot: https://nimb.ws/CS7iMD
— Blog Page – Screenshot here: https://nimb.ws/s8CFif
In both places, it is displaying the same excerpt, even though I have a custom excerpt for each post (and they are different, of course).
Any help would be much appreciated!
Hey Eleina,
Thanks for the screenshots. Please send us a temporary WordPress admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
Rikard
Okay, great, thank you, here you go!
Hi,
Thanks for that. This filter in your child theme seems to be causing that to happen:
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;
}
What exactly is the intention with this filter?
Best regards,
Rikard
Hi Rikard,
Thank you so much. I placed that code in to have a “Read More” link on the Masonry Image – so people would more clearly understand that you could click on the image and get to the actual post and learn more. Would love it if that element had a button option to read more. But, that being said, once I removed that code, the correct excerpts did appear on each post, so I think I will leave it that way and I thank you very much!
Hi,
Glad Rikard could 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