I’m going to use WordPress to manage a mainly static website.
Some of the pages (like the typical about us) have some paragraphs that should be editable from the admin panel. The thing is, I don’t want the client to have to deal with the html of the page or anything.
The first thing I thought was to use a page template, so the html is in the template php file, and the content can be edited from the admin panel. The problem is that the paragraphs are divided by some PHP code and some HTML markup that should not be edited, something like this:
<p> This is the first editable paragraph </p>
<?php /* some php code */ ?>
<img src="not-editable-img.png">
<p> This is the second editable paragraph </p>
If I use a page template, I only have one “field”, namely the page’s content (that would be output using the_content
). How can I make it have multiple fields? Something like “text for paragraph 1” and the like?
Should I use a custom post type? That would mean creating a custom post type for each page, and having just a single post for each custom post type. Is that the correct way?