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

    Hi there,
    I am looking for a solution to display Bed Bath Car icons in the Excerpt area of the Masonry Grid display.
    Any code I add to the Excerpt area gets stripped and displays as text only.
    Do you have any suggestions for workarounds or plugins to achieve this?

    #1495253

    Hey Suze,

    Thank you for the inquiry.

    You can try this code in the functions.php file to retrieve the original post excerpt without modification.

    add_filter( 'avf_masonry_loop_entry_content', 'avf_masonry_loop_entry_content_mod', 10, 4 );
    
    function avf_masonry_loop_entry_content_mod( $loop_excerpt, $entry, $entries, $key ) {
        if ( ! empty( $entry->post_excerpt ) ) {
            return $entry->post_excerpt;
        }
    
        return $entry->post_content;
    }

    — OR —

    add_filter( 'avf_masonry_entry_content', 'avf_masonry_entry_content_mod', 10, 3 );
    
    function avf_masonry_entry_content_mod( $content, $entry, $config ) {
        return $entry->post_excerpt;
    }
    

    Let us know the result.

    Best regards,
    Ismael

    #1495260

    Amazing – that worked! Thank you sooo much Ismael : )

    #1495274

    Hi,

    Great! Glad we could be of help. Please feel free to open another thread if you have more questions.

    Have a nice day.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Portfolio Excerpt to show icons’ is closed to new replies.