Is it possible to print different parts of content in template? Without ACF?

For example: print the first part of text, then the gallery, then the second part of text etc.

This in order to be able to control the layout in the template and not in each post.


It's "possible" - but might be imprecise - as you need to find a clean and accurate way to break your content - for example by adding "flags" or html comments to denote where to break it - these can easily be deleted by an editor if they don't understand what they do.

If not, you can programmatically split the content, but you will need to understand where to do this - this is not too complex if it's just <p>paragraphs</p> but lists or other html tags might end up corrupted. I'd suggest finding a way to make it work with ACF or other custom fields.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.