0

I just started building wordpress templates after coming from .NET so I am a bit new to it all.

While building a template I have several pages that I want to be filled with static content and not managed by the cms.

The solution I am using is to create page template files and then pages with no content in them. Ie page-how-i-work.php has the info, and its page inside of the cms is empty.

I contemplate putting the html inside the CMS but if I did that then I would be unable to use version control to easily track changes.

Is there a better convention that I am missing?

1 Answer 1

0

It is normal to have some text used in template. Typically that would be pieces of "technical" text, related to interface and which must be in code to be localized.

In solutions meant for public use it is certainly not normal practice to have actual content hardcoded in templates.

For private projects it is more or less — do what makes sense to you.

One question is — if you don't feel confident managing this content via admin interface and database (prefering it in version control), how are you confident managing any content via admin?

This might be a sign that you haven't fully figured out how your content workflows meant to be handled in WordPress, be it permissions, backups, or something else.

Also your "empty pages" approach seems fragile. The idea has been explored here and there in the past, for example as Static Templates, but I wouldn't say it is mainstream in WP development.

1
  • Thanks for the response! Your answer is exactly what I was looking for.
    – robbert229
    Commented Jul 15, 2016 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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