AdvancedCustomFields / AdvancedCustomFields/acf
ACF WSYIWIG Unknown Tag: <!-- wp:header -->
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
I am having an issue with the wysiwig field sometimes adding these strange tags/comments. I figure they are important, but in some cases they have an impact on the text formatting on the frontend. Here is an example of an issue i saw:
<!-- wp:header -->
<h1>Header Text</h1>
Some Text
<h1>Header Text</h1>
Some More Text
<!-- /wp:header -->
on the frontend the line breaks and spacing seems to get stripped from the content, but removing the <!-- wp:header --> tag resolves this. What are these tags and are they even needed?
It appears that when the tag is removed, the editor wraps the elements in a p tag, but otherwise it does not.
before:
\r\nSome text\r\n
\r\n<strong>Some Text\r\n</strong>
More Text\r\n
\r\n<strong>Some Text\r\n</strong>
More Text\r\n
after:
<p>Some text</p>\n
<p>
<strong>Some Text</strong>
<br />\n
More Text</p>\n
<p>
<strong>Some Text</strong>
<br />\n
More Text</p>\n
Note: the tags/comments also aren't consistent. Sometimes they are added to the editor code, but other times they are not.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported formatting in an ACF WYSIWYG field using the provided HTML examples, then compare the editor content with the frontend output. Determine when the wp:header comments are added and whether they change paragraph and line-break handling; done means the behavior is consistent and the intended rendered formatting is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- content, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100