-
AuthorPosts
-
May 22, 2021 at 7:12 pm #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.
May 26, 2021 at 7:31 am #1302372Hey 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,
IsmaelMay 26, 2021 at 2:03 pm #1302420Hi 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,
MichaelMay 31, 2021 at 5:12 am #1303056Hi,
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,
IsmaelMay 31, 2021 at 7:46 am #1303097Hi,
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,
MichaelJune 1, 2021 at 6:46 am #1303332 -
AuthorPosts
- You must be logged in to reply to this topic.