Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #402502

    Gday Enfold users

    I am using the Masonry grid for blog posts with ‘display excerpt’ set, and it cuts off at the expected automated length.

    However, my client would prefer to use the ‘Read More’ element inserted manually into the post due to wanting a variety of excerpt character lengths.

    When I add the element via the default editor in posts it makes no difference to the excerpt length on the masonry grid. Is that a known issue?

    cheers

    Darryl

    #403284

    Hey itchybrain!

    Thank you for using Enfold.

    Add this to the functions.php:

    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;
    }
    

    Adjust the style of the read more link using this selector, .masonry-more-link-arrow.

    Regards,
    Ismael

    #403743

    Thanks for your help with this Ismael, much appreciated…you guys are always very helpful.

    #404249

    Hey!

    Glad we could help :)

    Regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘'Read More' element within Masonry blog not working’ is closed to new replies.