Viewing 15 replies - 1 through 15 (of 16 total)
  • Perhaps I don’t understand the question.

    Try using the WordPress Dashboard to remove comments.

    Will

    Thread Starter kamaleon

    (@kamaleon)

    I don’t get what you mean…

    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.

    Will

    Thread Starter kamaleon

    (@kamaleon)

    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?

    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.

    Will

    Thread Starter kamaleon

    (@kamaleon)

    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

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

    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.

    http://affinityseries.com/wp351/?p=17

    http://affinityseries.com/wp351/?p=23

    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?

    Will

    Thread Starter kamaleon

    (@kamaleon)

    Here you go

    try with comments instead of discussion

    This is a bit frustrating πŸ™‚

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

    http://affinityseries.com/wp351/?page_id=14

    http://affinityseries.com/wp351/?page_id=30

    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.

    Will

    Thread Starter kamaleon

    (@kamaleon)

    I have the version from the wordpress repository…

    Thread Starter kamaleon

    (@kamaleon)

    It is version 1.1

    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.

    Will

    Thread Starter kamaleon

    (@kamaleon)

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

    Thread Starter kamaleon

    (@kamaleon)

    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 "
    <ul>";
      $custom_loop = new WP_Query('posts_per_page=-1&cat='.$cat->cat_ID);
      while($custom_loop->have_posts()) {
        $custom_loop->the_post();
        $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>
    ";
    }
    Thread Starter kamaleon

    (@kamaleon)

    I fixed it by adding this at the end

    wp_reset_query();

    before closing the php section and now it works πŸ™‚

Viewing 15 replies - 1 through 15 (of 16 total)

The topic ‘Works but cannot remove comments’ is closed to new replies.