Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  Sakin 3 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13062

    How do I remove comments all through the site?

    Thanks!

    #13110

    Sakin
    Keymaster

    @franklinchristianacademy: At this time you can disable it though your “Settings => Discussion” where it will remove it from all new pages and posts. But for those which has already been created, you need to manually remove it from you page and post settings. See this for more details http://en.support.wordpress.com/enable-disable-comments/

    Also there is option to remove it completely by building child theme and editing then copy the following code in child theme functions.php file

    // Function to show the loop content
    function catchthemes_theloop() {
        global $post;
    
        do_action( 'catchthemes_before_post' ); ?>
    
        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
            <?php do_action( 'catchthemes_before_post_header' ); ?>
    
            <header class="entry-header">
                <h1 class="entry-title">
                	<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute();?>"><?php the_title(); ?></a>
    				<?php
                    if( is_post_type_archive( 'testimonials' ) || is_singular( 'testimonials' ) ) {
                        $designation = get_post_meta( $post->ID, 'catchthemes_author_designation', true );
                        if( $designation ) {
                            echo ' | <span class="testimonial-meta">'.esc_attr( $designation ).'</span>';
                        }
                    } ?>
                </h1>
    
            <?php if ( ( is_single() || is_archive() || is_author() || is_front_page() ) && ( !is_singular( 'testimonials' ) && !is_singular( 'services' ) && !is_post_type_archive( 'testimonials' ) ) ) {
            ?>                        
                <footer class="entry-meta">
                    <span class="by-author vcard"><?php _e( 'By ', 'catchthemes' ); ?><a class="url fn n" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php echo esc_attr(get_the_author_meta( 'display_name' ) ); ?>" rel="author"><?php the_author(); ?></a></span>
                    <span class="date updated"><?php the_time(get_option('date_format')); ?></span>
                    <?php if( has_tag() ) { ?>
                    <span class="cat-links"><?php the_tags(''); ?></span>
                    <?php } ?>
                    <!-- <span class="comments-link"><?php //comments_popup_link( __( 'No Comments', 'catchthemes' ), __( '1 Comment', 'catchthemes' ), __( '% Comments', 'catchthemes' ) ); ?></span> -->
                </footer><!-- .entry-meta -->
            <?php
            }
            elseif( is_singular( 'testimonials' ) || is_post_type_archive( 'testimonials' ) ) {
                ?>
                <footer class="entry-meta">
                    <span class="date updated"><?php the_date( 'j F Y' ); ?></span>
                </footer><!-- .entry-meta -->
                <?php
            }
            ?>
            </header>
    
            <?php do_action( 'catchthemes_after_post_header' ); ?>
    
            <?php do_action( 'catchthemes_before_post_content' ); ?>
           
            <div class="entry-content clearfix">
                <?php
                if( is_archive() || is_author() || is_home() || is_post_type_archive( 'testimonials' ) ) {
    				$photos = get_children( array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') );
                    if( has_post_thumbnail() || !empty ( $photos ) ) {
    					if ( has_post_thumbnail() ) {
    						$image = get_the_post_thumbnail( $post->ID, 'blog' );
    					}
    					else {
    						$image = catchthemes_get_first_attached_image ( 'blog' );
    					}
    					
                        echo '
    					<div class="thumb">
    						<a href="' . get_permalink() . '" title="Permalink to '.the_title( '', '', false ).'">
    							'.$image.'
                      		</a>
    					</div><!-- .thumb -->';
                             
                        echo '<div class="content">';
                        the_excerpt();
                        echo '</div><!-- .content --> ';
    					
                    } 
                    else {
    					echo '<div class="content-full">';
                        the_excerpt();
    					echo '</div><!-- .content-full --> ';
                    }
                }
                elseif ( is_search() ) {
                    the_excerpt();
                }
                else {
                    the_content();
                    // copy this <!--nextpage--> and paste at the post content where you want to break the page
                    wp_link_pages(array( 
                        'before'            => '<div class="pagination clearfix">'.__( 'Pages:', 'catchthemes' ),
                        'after'             => '</div>',
                        'link_before'       => '<span>',
                        'link_after'        => '</span>',
                        'pagelink'          => '%',
                        'echo'              => 1 
                    ) ); 
                }
                ?>
            </div><!-- .entry-content --> 
            
            <?php do_action( 'catchthemes_after_post_content' ); ?> 
            
    	</article><!-- .post --> 
        
    	<?php do_action( 'catchthemes_after_post' );
        
        if( !is_singular( 'testimonials' ) && !is_singular( 'services' ) ) {
        
            do_action( 'catchthemes_before_comments_template' ); 
        
           //comments_template(); 
        
            do_action( 'catchthemes_after_comments_template' );
        }
    	
    }
    #67831

    PierreSG
    Member

    Hi Sakin,
    Can I use this code on my Kathmandu Child theme too?
    Thanks,
    Pierre

    #67833

    Sakin
    Keymaster

    @pierresg: Catch Kathmandu uses different structure. Can you post in Catch Kathmandu Support forum at http://catchthemes.com/support-forum/forum/catch-kathmandu-public/ and let me know what you want to do it?

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

The topic ‘Comments’ is closed to new replies.