Comment on WordPress Page Templates Tutorial by SEO Dave.

WordPress Post Template I think I know the issue, if you are adding the comment code below the date of the post code you have moved it inside the div with id=”post-entry” which will mess with the padding, so yes a CSS issue.

You could edit the CSS, but an easy fix would be to close the post-entry div add the comment code and reopen the div right after it which would mean the #post-entry CSS won’t affect the comment code.

This will break HTML validation as you aren’t supposed to use an id twice (all ids are supposed to be unique), not aware of any real issues with using an id twice (browsers are smart enough to cope with it) so I’d use it for a quick fix.

Below the code:

edit_post_link('Edit', '| ', ''); ?></div>

Add this

</div>

<?php if (comments_open()): ?>
<?php if (function_exists('wp_list_comments')): ?>
<?php comments_template('', true); ?>
<?php else : ?>
<?php comments_template(); ?>
<?php endif; ?>

<?php endif; ?>

<div id="post-entry">

This will result in two comment forms, so delete the corresponding code lower down the page between the if and endif.

There’s the page-example.php file for creating this type of page template and with the Stallion 7.0 Page templates work with blog Posts as well, so you won’t have to limit this type of page to static Pages only.

BTW not sure if you tried to add code to your comment, if you did it would be stripped if you didn’t surround it with code tags (an opening and closing code tag set).

An interesting idea, I saw a plugin (or code snippet, forget which) that strips the content from multiple page commented posts. The main post (page 1) shows the full content on the post and the comments for that page, comment page 2, 3, 4 etc… only shows the comments for pages 2, 3, 4 etc… which means there’s less duplicate content generated by having multiple page comments. WordPress core (and Stallion) adds a canonical URL to pages 2, 3, 4 etc… to the main page so Google etc… considers all of the comment pages as the main page. I was thinking removing the content od comment pages 2, 3, 4 etc… would be a bit like a forum output with page 1 describing what the thread is about. Plan to add the code to Stallion as an option.

David

Update: the above is a page template within the Stallion Responsive theme.