WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove comments from pages (Mystique v3.0.7) (13 posts)

  1. TinyTimmy
    Member
    Posted 3 years ago #

    Link to my site.

    How do I remove comments on pages. I want people to be able to leave comments on posts.

    I saw in other forums that I need to delete the following line of code from the page.php template:

    <?php comments_template(); ?>

    However, it's not there. I didn't have this problem before I upgraded to this new version today. Any ideas? Thanks in advance.

  2. ryandannar
    Member
    Posted 3 years ago #

    I am dealing with the same problem. I'd like to disable the comments on individual pages, because it just looks dumb and too blog-like to have comments appear at the bottom of static pages. I'd still like for comments to appear on individual posts. I'm using Mystique v3.0.9, and I have the child theme "Mystique Extend" enabled.

    I don't yet have an answer, but I can tell you what I've found out so far:

    In Mystique\core\AtomObjectPost.php, around line 106, we find some code which is designed (according to the comments preceeding it) to "replace WP's comments_template(), so we can use the nice ajax comments feature."

    That is why <?php comments_template(); ?> doesn't appear where you'd expect it to be. It has been replaced within this theme's core files with a different function. The question is, what is the name of the function that's called, and where is it called from?

    Well, it looks like the name of the function is queryComments(), but I'm not sure how or where it's being called from. I'm still messing around with it. I'll let you know when I have an answer.

  3. TinyTimmy
    Member
    Posted 3 years ago #

    What's up!

    When you go to edit your page (where you actually type in your content), in the upper right (if you're using the latest version of WP), next to the help menu, you will see the screen options menu. Click it and make sure that the comments and discussions check boxes are clicked. The when you scroll towards the bottom of the page, and your still in edit mode, you will see the comment and discussion fields. Simply disable. Knocked the problem out...no need to alter any templates and my comments work just fine on my blog.

    Hope that helps!

  4. ryandannar
    Member
    Posted 3 years ago #

    Oh my gosh this is easy, and now I feel dumb. But the answer does highlight a slight usability problem with the 3.2 version of WordPress.

    Basically, WP 3.2 hides several of the options that are available to you when editing a static page. To reveal those options, you have to click on the "Screen Options" tab next to the "Help" tab at the top. By default, "Custom Fields," "Discussion," "Comments," "Slug," "Author," and "Revisions" are all disabled, which results in these sections being hidden from view.

    So, to disable comments for specific pages on WordPress 3.2, using the Mystique theme (or any other theme, apparently):

    Go into the page-editor for whatever page you want to disable comments on. Click the "Screen Options" tab at the top, next to "Help." Put a checkmark in "Discussion." Scroll down. Under the page-editing box, you'll find the "Discussion" options, which were previously hidden. Uncheck "Allow Comments." Re-publish the page. Done.

    God, I spent more than four hours looking for this solution. I can't believe it was this easy. Now I feel dumb. Hopefully these instructions will save someone else from wasting as much time as I did.

  5. ryandannar
    Member
    Posted 3 years ago #

    Hey, sorry, TinyTimmy! I didn't see your post until just now. You hit the nail on the head, though. Thanks for your response.

  6. lisashomemadecakes
    Member
    Posted 2 years ago #

    big thank you for explaining how to do this - i have recently downloaded word press and am a complete beginner trying to put together a website for a new small cake business. i have been going round the houses trying to get rid of the comments part at the bottom of all the pages and thought i was going mad!
    thanks

  7. cganz
    Member
    Posted 2 years ago #

    Still shows comments but now says comments closed. Any way to get rid of this totally? Thanks

  8. Cambo
    Member
    Posted 2 years ago #

    @cganz

    Try this in your user css code within mystique settings:
    #meta {display:none;}

    Worked for me - I'm worried something else with an id of meta may of disappeared though.

  9. kaelx88x
    Member
    Posted 2 years ago #

    how about at quick edit .. untick allow comment?

  10. qsdnxu
    Member
    Posted 2 years ago #

    Well guys first advice does not worked for me, but Cambo's suggest was a god solution to remove all comment fields. thx man!

    If somebody still doesn' t know it, go to the appearance --> mystique --> css and there is an input where you can write this code:

    #meta {display:none;}

    than save it and you are ready. comment boxes are removed.

  11. Pali Madra
    Member
    Posted 2 years ago #

    Hey guys,

    Cambo's idea does do the job however, what it is doing is that hiding the content. What actually happens is all the work is done by wordpress to fetch the comments from the database and then something is spit out as comments which is hidden by CSS. Ideally I would not put any extra load on the server (because Google says so is good enough reason for me).

    Therefore the best is what my friend kaelx88x suggested which is in your Admin dashboard, Go to "Pages" -> "all pages". select all the pages for removing comments. Then from the "Bulk action" ,select "Edit" and then Apply. Then , a bulk Edit area will display, and their you can change Comments to "Do not allow". That is it you are done.

  12. obaid22
    Member
    Posted 2 years ago #

    The following worked for me:
    In "Pages", change "Template" to "Default"

  13. obaid22
    Member
    Posted 2 years ago #

    I did the above for my new site laundry-service-london.co.uk; which i am currently working on (not finished by a long margin!)

Topic Closed

This topic has been closed to new replies.

About this Topic