Is there a way to allow div tags in masonry blocks? I need to have <div class=””></div> tags for part of text is shown in masonry block – not for the whole text only on part of it. For example: Lorem ipsum dolor <div class=”text-style”>si amet</div>
As default it seems to clean all tags from $content.
Thank you!
Hey ace11!
You’ll need to edit your posts and add the div and whatever other text you want to display inside the excerpt field. If you do not see the excerpt field then click on “Screen Options” in the top right hand corner of your screen and check it to display.
Best regards,
Elliott
Hi!
Thank you for your answer.
I have div classes added to my post, but problem is that Masonry block does not show your own div classes at all. Seems that there is some filtering or something that cleans div tags from text. There is only basic tags which are set in masonry_entries.php.
Hi!
Yes, that is the default behaviour for excerpts. If you want to display shortcodes or HTML then you need to create a custom excerpt by filling out the excerpt field when editing your post, like I said before.
Here is an image explaining how it’s done, http://www.mhthemes.com/support/files/2014/07/Custom_Excerpts.png.
Cheers!
Elliott
Hi!
Thank you! This is solved :)