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

    Hello Enfold Theme,

    I have 2 question about Masonry Elements.

    1. How to reduce excerpt length for Flexible Masonry.

    2. When I choose Perfect Grid, Featured image not appear. It happen when I add masonry in color section.

    Thanks.

    #1356496

    Hey ayeh,
    Thanks for your patience, are you showing blog posts with the masonry element? You can try this to reduce the excerpt length, Try adding this code to the end of your functions.php file in Appearance ▸ Editor:

    add_filter('avf_masonry_excerpt_length','avia_change_masonry_excerpt_length', 10, 1);
    function avia_change_masonry_excerpt_length($length) {
    $length = 10;
    return $length;
    }

    but please note that adding a manual excerpt will override this.
    I tested a masonry in color section with the Perfect Grid, but the Featured image did show for me, so try creating a test page and include admin login in the Private Content area so we can examine.

    Best regards,
    Mike

    #1377456

    Hi Mike

    Is it possible to do this with the blog posts element? I want it to show something like 50 words and then Read More. I have set the post element to Title-Exerpt and read more.

    Dominic

    #1377534

    Hi Dominic,

    For blogposts that uses grid layout you can use:

    function custom_postgrid_excerpt_length($excerpt_length) {
    	$excerpt_length = 250;
    	return $excerpt_length;
    }
    add_filter( 'avf_postgrid_excerpt_length', 'custom_postgrid_excerpt_length');

    For blogposts that does not use grid layout, you can use the WordPress excerpt length filter:

    function av_custom_excerpt_length( $length ) {
        return 250;
    }
    add_filter( 'excerpt_length', 'av_custom_excerpt_length', 999 );

    Just change the length, hope it helps.

    Best regards,
    Nikko

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.