• I’m using the zen-minimalist theme, and the problem is that on all the Pages I’ve got, the comment form keeps showing up. I don’t want the comment form to show up on the pages, just on the posts.

    Is there a way I can remove this?

    At first I tried removing from the index.php:
    '<div id="comments-post">

    <?php comments_template(); // Get wp-comments.php template ?>

    </div><!-- end COMMENTS-POST -->'

    but then when I clicked on the comments link on the actual post, it wouldn’t show me the comment form.

    Can someone please tell me how I can get this to work? This can be seen at https://www.tempers.net.

    Thanks very much.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter torontobroad

    (@torontobroad)

    Is there anywhere to turn the comments off on the pages but not on the posts? This theme doesn’t have a single post template, just the main one.

    You can just copy the single.php file from the default theme into yours.

    Even better: make a page.php for displaying the Pages.
    Save your index.php as page.php and edit out/delete all the references to comments. WP will use this new template to display Pages. See Template_Hierarchy

    Thread Starter torontobroad

    (@torontobroad)

    Thanks very much for that answer. I took the index.php and copied it into a file called single.php – that single.php file shows up under presentation, theme editor, however it doesn’t show up in the list of page parents.

    Didn’t there used to be a spot in the WP editing pages, for a template to apply? I’m looking for that and I don’t see it.

    I think I need to pick a template and have it use this single.php for the pages. Right now I’ve just ticked the “allow comments” to be off.

    PS: I uploaded the single.php file into the themes/zen-min/ directory.

    Read my reply… in case you missed it ??
    (single.php is NOT a Page template, BTW. Please, feel free to follow the link I gave above and read about the templates system)

    Thread Starter torontobroad

    (@torontobroad)

    I’m at that page now – but I originally called it page.php and it didn’t show up as a template to use either.

    Thread Starter torontobroad

    (@torontobroad)

    Am I copying it to the right place? I’ve renamed it back to page.php and I can’t see it as a template to use.

    What shows up under page parent is “about us” “contact” yada, yada, all the pages that were already existing when I chose this theme.

    Basics.
    1. If you have only 1 Page template, i.e. the default page.php why should it show up? If it is there, WP knows when to pick it up: only when displaying Pages. You do NOT have to do anything.
    2. If you have more than 1 (one) Page templates, a drop-down menu will show up when Creating new Pages (and only then!) to give you the possibility to choose the proper Page template for your new Page.
    3. These templates have nothing to do with dislaying posts.

    Thread Starter torontobroad

    (@torontobroad)

    Ok, that was the problem – no page template dropdown was showing up – so I was looking under page parent.

    I just went to another of the pages, and the template dropdown finally showed, so now I should be able to pick that template without the comments part and it should work properly (I hope).

    Thanks very much for your patience.

    To add to what I said above: If you created 100 Pages before having a page.php template… and they were displayed by the index.php with the comment stuff… – after having the Page template in your theme you do NOT have to do anything: WP automatically will use the Page template to display every Page, old and new.

    Thread Starter torontobroad

    (@torontobroad)

    Yes, you’re right – I found that when I clicked on the single pages then.

    Thanks again for all your help.

    when I clicked on the single pages

    Carefull with this kind of phrases ?? that’s when the communication gets messy…
    Words like “single, pages, Pages” used together are always confusing. (That’s not your fault – that Page thingy should have some more distinctive name.)
    Single is associated with posts: like single view of posts, when single.php is used for display.
    Pages, by definiton in WP, are always single.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Comments on Pages’ is closed to new replies.