themehybrid / hybrid-core

Official repository for the Hybrid Core WordPress development framework.
GNU General Public License v2.0
687 stars 143 forks source link

Issues with how filters for hybrid/archive/description render blog page description #174

Closed skyshab closed 4 days ago

skyshab commented 4 years ago

When using a static page for the posts archive, or "blog" page, any content entered on the page will be pulled in as the "archive description".

When using the block editor, the content entered does not render 100% correctly in the archive description. For example, if I add a paragraph block, on the front end I see an extra paragraph before and after the content I entered. Inspecting this, I see that the paragraphs contain the block editor tags. ie, "" and "".

This seems to happen from the wpautop filter that is being added in vendor/justintadlock/hybrid-core/src/bootstrap-filters.php

If I replace the wpautop filter with "do_blocks" on line 36, the description is then displayed correctly. If I just omit the wpautop filter, and don't add "do_blocks", the content renders with the extra block editor tags/notes.

I'm not sure if this will work in other circumstances, like if not using the block editor. In that case, you might need to still run through wpautop?

If simply changing out wpautop for do_blocks will work, I can submit a PR.

skyshab commented 4 years ago

It stripped out my text with the block editor comments in the markup. It's what you would see in the editor in "code view".

saas786 commented 4 days ago

@skyshab

Please let me know if you still require assistance with this. I will go ahead and close it for now.