Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3326

    Is there anyway on a Portfolio page like this: http://sideeffectsdesign.com/wordpress/?p=166 to remove all mention of comments? Comments are never going to be open on this site, so it doesn’t need to say ‘comments closed’. That is the main thing I would like to hide. I’d like to hide the other ‘No Comments ,Edit’ at the top as well though.

    #41681

    Hey,

    There are a couple of modifications you need to make to single.php to remove the comment references. This will affect all posts in all categories. Open up single.php, find and remove this code:

    <span class="comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><?php edit_post_link('Edit', ' ,', ''); ?></span>

    and also:

    <div class='entry commententry'>
    <?php comments_template(); ?>
    </div>

    If you need comment references only to be removed for Portfolio category posts, you can use conditional code such as:

    <?php if (! is_category('portfolio') ) { ?>

    <?php } ?>

    around the code to delete above.

    James

    #41682

    Worked great thanks!

    #41683

    Can you show how to do this for the CleanCut theme as well? Would like to remove the “Comments Off” tag from the Portfolio Category pages. Thanks!

    #41684

    Hey,

    open up single.php and search for following code:

    <div class='entry commententries'>
    <?php comments_template(); ?>
    </div>

    Replace it with:

    <?php if (! get_post_type() == 'portfolio' ) { ?>

    <div class='entry commententries'>
    <?php comments_template(); ?>
    </div>
    <?php } ?>

    #41685

    That worked for the individual portfolio pages but when I show a list of all the items in a category, the “Comments Off” is still showing up. Here are links to what I’m talking about:

    http://iosodesign.com/portfolio_entries/tamrafuscaldo/

    and

    http://iosodesign.com/portfolio_entries/healthcare/

    Thanks!

    #41686

    To remove it open up archive.php and replace:

    <span class="comments"><?php comments_popup_link(__('No Comments','cleancut'), __('1 Comment','cleancut'), __('% Comments','cleancut')); ?></span>

    with:

    <?php if (! get_post_type() == 'portfolio' ) { ?>

    <span class="comments"><?php comments_popup_link(__('No Comments','cleancut'), __('1 Comment','cleancut'), __('% Comments','cleancut')); ?></span>
    <?php } ?>

    #41687

    Could you also advise of how this is done with the Broadscope theme? Would like to remove the comment/”Leave a Reply” section from all areas. Also, have removed comments from the speech bubbles at the side of posts but would like to remove the bubble image also, if you could give some guidance that would be great!

    Thanks

    #41688

    I found where to remove the comments section in Broad scope theme:

    Deleted following code from Comments (comments.php):

    <div class=’comment-entry post-entry’>

    <?php if ( have_comments() ) : ?>

    <h4 id=”comments”><?php

    printf( _n( ‘One Response to %2$s’, ‘%1$s Responses to %2$s’, get_comments_number(), ‘avia_framework’ ),

    number_format_i18n( get_comments_number() ), ” . get_the_title() . ” );

    ?></h4>

    <?php if ( get_comment_pages_count() > 1 && get_option( ‘page_comments’ ) ) : // Are there comments to navigate through? ?>

    <?php previous_comments_link( __( ‘← Older Comments’, ‘avia_framework’ ) ); ?>

    <?php next_comments_link( __( ‘Newer Comments →’, ‘avia_framework’ ) ); ?>

    <?php endif; // check for comment navigation ?>

    <ol class=”commentlist”>

    <?php

    /* Loop through and list the comments. Tell wp_list_comments()

    * to use avia_inc_custom_comments() to format the comments.

    * If you want to overload this in a child theme then you can

    * define avia_framework_comment() and that will be used instead.

    * See avia_framework_comment() in includes/loop-comments.php for more.

    */

    wp_list_comments( array( ‘callback’ => ‘avia_inc_custom_comments’ ) );

    ?>

    <?php if ( get_comment_pages_count() > 1 && get_option( ‘page_comments’ ) ) : // Are there comments to navigate through? ?>

    <?php previous_comments_link( __( ‘← Older Comments’, ‘avia_framework’ ) ); ?>

    <?php next_comments_link( __( ‘Newer Comments →’, ‘avia_framework’ ) ); ?>

    <?php endif; // check for comment navigation ?>

    <?php else : // or, if we don’t have comments:

    /* If there are no comments and comments are closed,

    * let’s leave a little note, shall we?

    */

    if ( ! comments_open() ) :

    ?>

    <p><?php _e( ‘Comments are closed.’, ‘avia_framework’ ); ?></p>

    <?php endif; // end ! comments_open() ?>

    <?php endif; // end have_comments() ?>

    <?php

    /* Last but not least the comment_form() wordpress function

    * renders the comment form as defined by wordpress itself

    * if you want to modify the submission form check the documentation here:

    * http://codex.wordpress.org/Function_Reference/comment_form

    */

    comment_form(); ?>

    </div>

    #41689

    For anyone wanting to do similar was able to remove second speech bubble for comments image by replicating bg-meta.png (Broadscope>images>skin1>bg-meta.png) using Adobe Illustrator.

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

The topic ‘Remove all mention of comments?’ is closed to new replies.