You may think only a few pages need this today. What about a few months from now when the need increases? Maybe it will, maybe it won’t. It’s still wise to anticipate reasonable growth.
You can use the custom fields meta box to enter the desired content for each individual page. Admittedly, this meta box does not present the best UI, but it works. You could use a custom fields plugin like Advanced Custom Fields to build a better UI if you like. For example, an ACF field could be a large <textarea> for entry of larger amounts of content.
Either way, such data entered is saved in the post meta table. As an example, lets say in the custom field you entered “The best foobars available!” under the name “my-content”. To display this on the page, add to your page template something similar to:
$my_content = get_post_meta( get_the_ID(), 'my-content', true );
if ('' != $my_content ) {
echo "<div class=\"my-content\"><h3>$my_content</h3></div>";
}
Then this one template will suffice for all such pages. If a page does not have any content defined, nothing happens, it’s as if the added code did not exist. When content is defined, the unique value saved with the page is output along with the common div and h3 HTML. The same template is used even if there are 100 pages with differing content and hundreds more without. It could be your theme’s default page template if you want.
Another situation that might arise is you only have four different messages which are selected based on an assigned taxonomy term or category. While you could have four different templates, one for each term, you could instead use a switch/case structure to define the four messages and selectively output one of them.
switch (wp_get_post_terms(get_the_id(),'category')[0]->name) {
case 'foo':
$msg = 'first message';
break;
case 'bar':
$msg = 'second message';
break;
// declare two more cases...
default:
$msg = '';
}
if ('' != $msg ) {
echo "<div class=\"my-msg\"><h3>This is the $msg.</h3></div>";
}
One block of code covers all four possible conditions plus the case where no message should output. Again, one template could cover the needs for many dozens of pages.
Typically the reason to create multiple templates should be limited to significant changes to the total layout of a page where coding it all on one template would be cumbersome and it’d be difficult to read the resulting code.