wpautop wraps post content in p tags and converts double line breaks to br. Silently breaks grid and flex layouts because CSS selectors no longer match.

The fix

For layout-sensitive pages, bypass the_content():

$post_obj = get_post();
echo do_shortcode(wp_kses_post($post_obj->post_content));

I keep wpautop on for blog posts (where it is useful) and bypass for landing pages.

Founder, ClickBrown · Christchurch, New Zealand

Sole Shopify developer at Army & Outdoors for 6.5 years. Builder of 11 live production systems across 4 regional stores. Writing about what actually works — not what sounds good in documentation.

Read more about →