Text node on empty archive page
-
Hi,
I have created a page with the short code
[mailpoet_archive]
but there are no newsletters (yet) so the plugins generates the text “Oops! There are no newsletters to display.”So far, so good. But the problem is when using a block theme like Twenty Twenty-Three (or an adaptation of that theme) this text creates a text node in the DOM, instead of as HTML element (like a paragraph) with the text inside it. This has the consequence that the text is not aligned with other elements (like the title or other elements) on that same page.
This is due to the style rule:
body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: var(--wp--style--global--content-size); margin-left: auto !important; margin-right: auto !important; }
which sizes and center-aligns all elements inside the main page content wrapper to the global content size. But the rule does NOT apply to text nodes.
If the text were formatted with wpautop(), wrapping it in P tags, or even simply wrapped in DIV tags, it would be aligned just fine.
The page I need help with: [log in to see the link]
- The topic ‘Text node on empty archive page’ is closed to new replies.