Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #11639

    Hi there,

    We are using our pages to stage our clients and products (which we don’t want comments on), and are using our posts to create news and content (which we would love comments on). We have also added in a plugin to give pages the ability to be categorized as well.

    1) Is there a way to disable comments only on ‘pages’? While they don’t show up on our pages at this time, when we use the Dynamic Template system to create a ‘Blog section’ using categories they are within, the result is displaying “0 Comments” under each page listing. I’ve tried to look inside the page.php file for the <?php comments_template … section of coding or anything like it, but no luck.

    2) Is there a way this could only be done for things that are defined as ‘pages’ and not ‘posts’ (as opposed to all blog listing systems)?

    (We would like the comments to appear on this page http://nofeebroadway.com/buzz/news/ but not this page http://nofeebroadway.com/past/)

    I hope this is clear….. let me know if i need to clarify, and thank in advance for your help!!

    #72468

    The wordpress dashboard lets you enable or disable comments for every page/post when you create it. Just turn them off on the pages you don’t need comments. If you can’t see the comments control panel in the dashboard you may need to enable it. Go into the screen options menu at the very top of the screen and enable the comments checkbox.

    #72469

    rumblefish,

    thanks for the response here. we’ve deactivated the comments ability on all of our pages to try and achieve this goal, and I think it should work out fine. only issue is that now the blog sections on any dynamic templates that pull pages where comments have been turned off has the lines ‘comments off’ below, which is actually affecting the readability of the page title and doesn’t look too great. (see here: http://nofeebroadway.com/broadway/).

    Do we know of a way to turn off this displaying there?

    ps – apologies for the typo in this article’s original title… should have been ‘comments’ not ‘fonts…’

    #72470

    The links to your site only show the loading page.

    You can either take the “comments off” text out of the .php file that produces that text (I forget which one it is), or you might be able to turn off the comments meta using css. ( something along the lines of: .comments-link {display:none;} – i’m not sure of the exact class for that meta)

    Sorry this is a bit vague but I can’t see your site to be more specific.

    #72471

    rumblefish,

    thanks for the tip. the .comments-link {display:none} does the trick for the most part (it leaves a little mid-line dot that would appear before the comments-link section), but I can live with it if that’s the best solution. the only other complication with this is that it removes the comments-link from any and all page or post lists.

    apologies, we are using a ‘coming soon’ plugin to hide the site from crawlers as we stage it. i’ve deactivated it if you want to take a better look–

    #72472

    In the loop-single.php file you need to find this section (below) and edit the comment text that you don’t want. For example to remove the “Comments Off” you need to replace (‘Comments Off’, ‘avia_framework’) with something like (‘ ‘, ávia_framework’).

    // <?php comments_popup_link(“0 “.__(‘Comments’,'avia_framework’),

    1 “.__(‘Comment’ ,’avia_framework’),

    % “.__(‘Comments’,'avia_framework’),’comments-link’,

    “.__(‘Comments Off’,'avia_framework’)

    ); ?>

    Ignore the //. I put that in because sometimes posting code in these boxes screws up.

    NB This code section is displaying a bit wrong, but it’s enough to be able to locate it.

    I’m not sure if this code is repeated in other .php files. You might need to edit more than one.

    #72473

    Rumblefish,

    This works :)

    It doesn’t remove the mid-line dot, but this option does allow us to have the comments count displayed for posts and pages we have them activated for as well as remove the ‘comments off’ text for pages and posts we didn’t want it listed for. For anyone else looking for how to do this – a word of caution. In the loop-index.php, don’t delete the dot in “.__(”,’avia_framework’) otherwise it will give you a site error. You have to edit this code in a few of the loop files (3 or 4). Ours now reads:

    <span class=’comment-container’><?php comments_popup_link(“0 “.__(‘Comments’,'avia_framework’), “1 “.__(‘Comment’ ,’avia_framework’),

    % “.__(‘Comments’,'avia_framework’),’comments-link’,

    “.__(”,’avia_framework’)

    #72474

    Glad you got it working. The mid line dot you can probably remove also. You just need to identify which part of the code is displaying it.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Disable Fonts on 'Pages' But Not 'Posts'’ is closed to new replies.