So I am going to be taking a bit of time here while I rebuild my site to document what I am learning. Otherwise, this site is going to languish for months while I run off to learn new things.
I am also playing with the Twig templating system, and the very first thing I discovered is …
Install TinyMCE Advanced and tell it to preserve paragraph tags when toggling between the Visual and Text tabs.
The Timber implementation of Twig for WordPress doesn’t always act as expected when grabbing content for teasers and the like.
Preserving HTML in the source of the post also means you have control through Twig on whether or not to strip tags, rather than:
- Relying on what WordPress hands you.
- Having to keep straight when WordPress returns raw content and when it returns with with the HTML added back in.