Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24454

    I seem to be asking the opposite question of most others, but I currently have comments enabled in my portfolio posts and we’ve actually decided that we do not want those… and I can’t remember how I got them in there in the first place. :)

    So the question is… how to disable comments from the portfolio entries only (still allowing comments on blog posts)?

    Thanks!

    #123519

    Hey!

    Open up single.php and replace:

    comments_template( '/includes/comments.php');

    with

    if(get_post_type() != 'portfolio') comments_template( '/includes/comments.php');

    Regards,

    Peter

    #123520

    Simple and beautiful – thanks! But it does still show ‘0 comments’ under the date… how would I remove that from portfolio entries?

    #123521

    In loop-index.php delete following code:

    <span class='comment-container'><?php comments_popup_link("<strong>0</strong> ".__('Comments','avia_framework'), "<strong>1</strong> ".__('Comment' ,'avia_framework'),
    "<strong>%</strong> ".__('Comments','avia_framework'),'comments-link',
    "<strong></strong> ".__('Comments<br/>Off','avia_framework')
    ); ?>

    or replace it with

    <?php if(get_post_type() != 'portfolio') { ?>
    <span class='comment-container'><?php comments_popup_link("<strong>0</strong> ".__('Comments','avia_framework'), "<strong>1</strong> ".__('Comment' ,'avia_framework'),
    "<strong>%</strong> ".__('Comments','avia_framework'),'comments-link',
    "<strong></strong> ".__('Comments<br/>Off','avia_framework')
    ); ?>
    <?php } ?>

    #123522

    Thanks again! Your support is always top-notch. :)

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

The topic ‘How to remove comments from portfolio pages?’ is closed to new replies.