Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1301766

    Since Enfold 4.8.2 the Mansonry shows shortcodes of post.

    e.g. this shortcode is shown:

    
    [av_codeblock wrapper_element='' wrapper_element_attributes='' codeblock_type='' alb_description='' id='' custom_class='' template_class='' av_uid='av-ko8acfo1' sc_version='1.0']
    

    As workaround I have tried to activate the wordpress Excerpt block in post editor and fill it with text. But this text is also ignored and the output keeps the not translated shortcode.

    Before Enfold 4.8.2 it was OK and no text at all was shown in Masonry view.

    #1302372

    Hey zwachm,

    Thank you for the inquiry.

    Looks like the content of the Advance Layout Builder (ALB) is displaying as excerpt. Try to use this filter in the functions.php file to prevent the excerpt from displaying when the post is using the ALB.

    add_filter('avf_masonry_loop_entry_content', function($content, $entry) {
          $is_alb =  Avia_Builder()->get_alb_builder_status( $entry->ID ) == 'active';
          if($is_alb) $content = "";
          return $content;
    }, 10, 2);
    

    Best regards,
    Ismael

    #1302420

    Hi Ismael,

    you are right. since the last ENFOLD update this shortcode is shown. So the behavior has changed!
    Why?

    Your code has not solved the problem. I digged into your code myself and found, that in case of post_format==link,
    the content is beiing replaced after this hook.

    My soliton was to hook into post-format-link, usint this coding:

    add_filter('post-format-link', function($entry) {
          $is_alb =  Avia_Builder()->get_alb_builder_status( $entry['ID'] ) == 'active';
          if($is_alb) $entry['content'] = "";
    
          return $entry;
    }, 10, 2);
    

    Hopefully you can solve this issue within the next ENFOLD update!

    Regards,
    Michael

    #1303056

    Hi,

    Thank you for the update.

    In the latest version 4.8.3, you can use this filter to alter the content of the masonry items.

    add_filter("avf_masonry_entry_content", function($content) {
        return ""; 
    }, 10);
    

    This should return an empty string or text.

    Best regards,
    Ismael

    #1303097

    Hi,

    Thank you for the hint.

    in case of a content for Masonry, created with ALB Builder, displaying the shortcodes is always wrong!

    Either the shortcodes needs to be executed or must be removed.

    So I think you should correct this in your code – it was ok in the last ENFOLD version.

    Regards,
    Michael

    #1303332

    Hey!

    Yes, we understand. This is why the filter was added, to allow us to correct the issue until we figure out what is actually causing the issue. You can also keep the previous code that you posted above, which seems to be working properly.

    Cheers!
    Ismael

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