Support » Fixing WordPress » How to Add Comments link to Pages?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter misty9

    (@misty9)

    Anybody there? Thx.

    Compare files page.php and single.php (in your theme folder), and see what is missing in page.php; for example, <?php comments_template(); ?>

    Thread Starter misty9

    (@misty9)

    The Green Bug theme doesn’t seem to have a file named by Page.php. Here are all the default files:

    comments.php
    footer.php
    functions.php
    header.php
    index.html
    index.php
    sidebar.php
    single.php
    style.css

    Perhaps, I should find a Page.php from other theme and tweak it to fit the Green Bug theme. Any suggestions?

    Thanks.

    Hmm, interesting. I ran out of steam here. Gurus?

    Thread Starter misty9

    (@misty9)

    I guess that not all theme designers follow the standards. Green Bug theme is just one of those examples. Given that his Page content shows up in the theme withOUT the Page.php, I suppose there might be a way to tweak the code to have the Comments link for all Pages instead of Posts.

    Green Bug theme can be download from the following location:
    http://themes.wordpress.net/columns/2-columns/3574/green-bug-10/

    Now, can you gurus help me with the following:

    1. What is the general program calling sequence for the 9 files from my last post? Probably starting from index.php?

    2. Can you give me some code example in how Page.php is called if it exists?

    Thanks.

    Thread Starter misty9

    (@misty9)

    Yes. Thanks for the very helpful page. I will study that page and work on creating a simple page.php with <?php comments_template(); ?> in it.

    Thread Starter misty9

    (@misty9)

    Okay, my simple page.php with <?php comments_template(); ?> adds the Comment form to ALL Pages.

    Now, there are certain pages that I do not wish to have the Comment form, how can I achieve that? Thanks.

    Oh, I get it. Deselect the “allow comments” from WordPress web interface.

    Let me test everything before I update this post. Thanks so much everyone.

    Make another Page template (see the Templates section: Pages).
    When you have the default (page.php) AND another one, then you have the option to select which template to use when Writing.

    Thread Starter misty9

    (@misty9)

    Oh, I get it. Deselect the “Allow Comments” from WordPress web interface for the pages that you don’t want Comments forms.

    Let me test everything before I update this post. Thanks so much everyone.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to Add Comments link to Pages?’ is closed to new replies.