WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Showing Comments on Static Pages? (7 posts)

  1. soilworker
    Member
    Posted 9 years ago #

    90% of the topics I get when searched for this gave me a "Internal Server Error" and the rest didn't help at all...

    How do I allow for comments on static pages? I have the box checked when I edit the page, but no options for comments show up at all when I look at the page.

    Any help is much appreciated.

  2. moshu
    Member
    Posted 9 years ago #

    Probably there is no comment link and call for the comments.php template in your page.php template.
    Check the differences between the index or single and page template - and edit accordingly.

  3. soilworker
    Member
    Posted 9 years ago #

    I'm not quite sure what you're saying I should do...

    I've tried pasting this line from my post template into my page template:
    <?php comments_template(); ?>

    What happens is the alignment gets really screwed up. The text box is centered in the page, and the "Add my comment" button overlaps the "trackback URI" & "number of comments on this post" links.

  4. moshu
    Member
    Posted 9 years ago #

    I am not familiar with your theme, but probably there is more than just that one line - I mean it could (should?) be wrapped in some html tags (div or something) which would define the formatting.
    (On the other hand I saw 3 Pages in your blog... why would you want to have comments on the About or Contact Pages?)

  5. soilworker
    Member
    Posted 9 years ago #

    Oh, heh. I'm making a section that'll have some of the videos I've made (I'm also an amateur filmmaker). I figured people could post their thoughts on any of them via a comments section, and I'd just disable comments on the other pages...

    I put <?php comments_template(); ?> right after the line <?php endwhile; endif; ?> in the post template. I also put <div> tags around it as well, and it didn't make any difference.

    And the theme is Rin 1.0

  6. moshu
    Member
    Posted 9 years ago #

    In that case here is my suggestion:
    Leave the page.php as it was - even with comments turned off you'd have "Comments off" or something like that visible on the Pages like About and Contact.
    Instead create another Page template, i.e. save your single.php (or if you don't have one in your theme - index.php) as videos.php. Put at the top:
    <?php
    /*
    Template Name: Video
    */
    ?>

    See more details in Codex.
    Upload it to your theme folder and go to Write > Write Page panel to create/write a new Page. From the dropdown menu select Page Template: Video. (You may not see the dropdown now if you have only the default - page.php - template, but it will appear when you have more Page templates.)
    In this way you'll achieve what you want and still will have nice about and contact Pages :)

  7. soilworker
    Member
    Posted 9 years ago #

    Hey thanks, it worked! Just had to add a line to include the sidebar.

    Just one little side effect.... If you look at the video page now (http://stupidchronicles.com/index.php/videos/) the alignment is too far to the right and I can't, for the life of me, figure out how to fix that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.