Support » Plugins and Hacks » [Resolved] Works but cannot remove comments

[Resolved] Works but cannot remove comments

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author WillBontrager


    Perhaps I don’t understand the question.

    Try using the WordPress Dashboard to remove comments.


    I don’t get what you mean…

    Plugin Author WillBontrager


    Log into your WordPress admin Dashboard.

    In the menu on the left-hand side of the page, click on “Comments.” You can remove comments there.


    I want a page with no comments at all. I don’t want to delete them. From the beginning, a page with the comments disabled. You do that by unchecking the comments at the bottom of a page or a post. I already did that, but when there is php in that page (with your plugin), the option to comment does not disappear.

    Are you getting me?

    Plugin Author WillBontrager


    Let’s first make sure the settings are like they’re supposed to be.

    In the Dashboard, in “Settings | Discussion,” verify the settings specifically won’t allow comments.

    If you still see the option to comment when the Insert PHP plugin is used, and not when it is removed, then post the entire code you’re using. I’ll see what I can see.


    I want comments in some posts, and I don’t want comments in other posts… So I cannot disable it from “Settings | Discussion,” as you say. I have to do it in a post by post (or page) basis.

    Create a new page and add this code from your webpage and try disabling comments on this page:

    hello this is a test

    echo ‘Server date and time is: ‘;
    echo date(‘l, F j, Y \a\t G:i:s’);

    Plugin Author WillBontrager


    I need a bit of help, as I really want to duplicate this issue.

    The installation is 3.5.1 and comments are turned on. I have two posts. One is with the Inert PHP and the other without.

    I’m going to post the two URLs, see if the system will allow it.



    What I can’t figure out is how to turn comments off for an individual page. And I need to do that to duplicate the issue.

    Any pointers?


    Here you go

    try with comments instead of discussion

    Plugin Author WillBontrager


    This is a bit frustrating 🙂

    I have two posts (URLs above) and two pages:



    One of the posts has the Insert PHP code and the other does not. Same with the pages, one has it and the other now.

    The site has comments turned on. The four pages have their individual comments turned off.

    No comment box appears whether or not the Insert PHP code is on the post or page.

    I’m using version 1.1 of Insert PHP. It had a bug fix. If you’re using 1.0, try upgrading and see if the issue disappears.


    I have the version from the wordpress repository…

    It is version 1.1

    Plugin Author WillBontrager


    I’m sorry I’m unable to duplicate the issue.

    My thought is to just not use Insert PHP, for now, while it is interfering with things. I’ll cogitate on it and maybe figure out a way to duplicate it so I can investigate.

    Sorry I’m unable to help you right now.


    I will try it on an empty wordpress to check if it is working…

    Can you try with this code? Changing the include=5 with a category number that you have… It lists all the posts in a category

    $cats = get_categories('include=5');
    foreach ($cats as $cat) {
      echo "
      $custom_loop = new WP_Query('posts_per_page=-1&cat='.$cat->cat_ID);
      while($custom_loop->have_posts()) {
        $category = get_the_category();
        // Only display a post link once, even if it's in multiple categories
        if ($category[0]->cat_ID == $cat->cat_ID) {
          echo '
    <li><a href="'.get_permalink().'">'.get_the_title().'</a></li>
      echo "</ul>

    I fixed it by adding this at the end


    before closing the php section and now it works 🙂

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Resolved] Works but cannot remove comments’ is closed to new replies.