In Chapter 3, I intended my pages (About and Contact) to be static. So I removed the comments_template
and comments_number
template tag from the page.php
template. But what if I want (or want my theme users to be able) to create a static page that lets users leave comments? This is easily achieved by creating a custom page template:
Let's use the following steps for creating a custom page template in our theme:
Create a new file that contains the markup, CSS styles, and template tags you'd like your optional template page to have. I made a copy of my
page.php
and called itpage_dynmc.php
. I then copied the following comment loop back into it:... <div id="pagecomments"> <?php comments_template(); ?> </div> <div class="comments"> <div class="commentIcon"><?php comments_number("No Comments","<span class="bigNum">1</span> response","<span class="bigNum">%</span> Comments...