WordPress.org

Forums

help with comments - code problem (4 posts)

  1. qulisyqultury
    Member
    Posted 2 years ago #

    Hi i want your help with a code : problem is simple below post i have another frame with comments : u add your name + mail + comment . I want to get ridd of all that below post comments frame and replace it with my facebook comments plugin only - any1 know which part of single post code to remove to get rid of "comments frame" ?

    <?php
    /**
     * The main template file for display single post page.
     *
     * @package WordPress
    */
    $post_type = get_post_type();
    
    if($post_type == 'gallery')
    {
    	include (TEMPLATEPATH . "/gallery.php");
    	exit;
    }
    
    get_header(); 
    
    ?>
    		<br class="clear"/>
    
    		<!-- Begin content -->
    		<div id="content_wrapper">
    
    			<div class="inner">
    
    				<!-- Begin main content -->
    				<div class="inner_wrapper">
    
    					<div class="sidebar_content">
    
    <?php
    
    if (have_posts()) : while (have_posts()) : the_post();
    
    ?>
    
    						<!-- Begin each blog post -->
    						<div class="post_wrapper">
    
    							<div class="post_header_wrapper">
    					    		<div class="post_header single_post">
    					    			<h2><?php the_title(); ?></h2>
    					    		</div>
    					    	</div>
    
    					    	<br class="clear"/>
    
    					    	<div class="post_wrapper_inner">
    						    	<div class="post_detail space half">
    						    		<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/clock.png" class="middle"/> <?php echo get_the_time('d M Y'); ?> 
    						    		<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/author.png" class="middle"/> <?php echo _e( 'Posted by', THEMEDOMAIN ); ?> <?php echo get_the_author(); ?>
    						    		<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/comment_alt2_stroke_14x16.png" class="middle"/> <?php comments_number('0 Comment', '1 Comment', '% Comments'); ?>
    						    	</div>
    					    	</div>
    
    					    	<?php
    					    		if($post_type != 'reviews')
    					    		{
    					    	?>
    					    		<br class="clear"/>
    					    	<?php
    					    		}
    					    	?>
    
    					    	<div class="post_wrapper_inner">
    
    								<?php
    								$pp_blog_single_img = get_option('pp_blog_single_img');
    
    								if(!empty($pp_blog_single_img) && $post_type != 'reviews')
    								{
    
    									if(has_post_thumbnail(get_the_ID(), 'home_ft'))
    									{
    									    $image_id = get_post_thumbnail_id(get_the_ID());
    									    $image_thumb = wp_get_attachment_image_src($image_id, 'home_ft', true);
    									}
    
    									if(!empty($image_thumb))
    									{
    								?>
    
    								<div class="post_img">
    									<a>" title="<?php the_title(); ?>">
    										<img src="<?php echo $image_thumb[0]; ?>" alt="" class=""/>
    									</a>
    								</div>
    
    								<?php
    									}
    								}
    								?>
    
    								<div class="post_inner_wrapper">
    
    								<?php
    									$pp_enable_rating = get_option('pp_enable_rating');
    
    									if(!empty($pp_enable_rating) && $post_type != 'reviews')
    									{
    										echo do_shortcode('[ratings id="'.get_the_ID().'"]');
    								?>
    
    						        <?php
    						        	}
    						        ?>
    								<br class="clear"/>
    								<?php
    									the_content();
    								?>
    
    								</div>
    
    							</div>
    							<!-- End each blog post -->
    
    						</div>
    
    						<br class="clear"/>
    
    						<div class="post_wrapper" style="margin-top:15px">
    
    							<div class="post_wrapper_inner">
    
    							<?php
    								$pp_blog_display_social = get_option('pp_blog_display_social');
    
    								if(!empty($pp_blog_display_social)):
    							?>
    							<ul class="social_media">
    								<h5><?php _e( 'Share This', THEMEDOMAIN ); ?></h5>
    
    <li>
    									<a> <?php the_permalink()?>" title="Retweet">
    										<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/twitter.png" alt=""/>
    									</a>
    								</li>
    <li>
    									<a>&title=<?php the_title()?>" title="Digg it">
    										<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/digg.png" alt=""/>
    									</a>
    								</li>
    <li>
    									<a>&t=<?php the_title()?>" title="social_black to Facebook">
    										<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/facebook.png" alt=""/>
    									</a>
    								</li>
    <li>
    									<a>&title=<?php the_title()?>&annotation=" title="Google Bookmark">
    										<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/google.png" alt=""/>
    									</a>
    								</li>
    <li>
    									<a>" title="RSS">
    										<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/rss.png" alt=""/>
    									</a>
    								</li>
    							<?php
    								endif; ?>
    
    							<?php
    								$pp_blog_display_author = get_option('pp_blog_display_author');
    
    								if($pp_blog_display_author)
    								{
    							?>
    
    							<br class="clear"/>
    							<h5><?php _e( 'About The Author', THEMEDOMAIN ); ?></h5>
    
    							<div id="about_the_author">
    								<div class="thumb"><?php echo get_avatar( get_the_author_meta('email'), '50' ); ?></div>
    								<div class="description">
    									<strong><?php the_author_posts_link(); ?></strong>
    									<?php the_author_meta('description'); ?>
    								</div>
    							</div><br class="clear"/>
    
    							<?php
    								}
    							?>
    
    							<?php
    								$pp_blog_display_related = get_option('pp_blog_display_related');
    
    								if($pp_blog_display_related)
    								{
    							?>
    
    							<?php
    							//for use in the loop, list 5 post titles related to first tag on current post
    							$tags = wp_get_post_tags($post->ID);
    							if ($tags) {
    							  $first_tag = $tags[0]->term_id;
    							  $args=array(
    							    'tag__in' => array($first_tag),
    							    'post__not_in' => array($post->ID),
    							    'showposts'=>3,
    							    'caller_get_posts'=>1
    							   );
    							  $my_query = new WP_Query($args);
    							  if( $my_query->have_posts() ) {
    							  	echo '<br class="clear"/><h5>Related Posts</h5><br class="clear"/>';
    							 ?>
    
    							  <div class="related_posts">
    
    							 <?php
    							 	global $have_related;
    							    while ($my_query->have_posts()) : $my_query->the_post();
    							    $have_related = TRUE;
    							 ?>
    							    <div class="each_item">
    							    	<?php
    							    		if(has_post_thumbnail($post->ID, 'related_post'))
    										{
    											$image_id = get_post_thumbnail_id($post->ID);
    											$image_url = wp_get_attachment_image_src($image_id, 'related_post', true);
    							    	?>
    							    		<a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php echo $image_url[0]; ?>" alt="" class="frame"/>
    							    		</a>
    							    	<?php
    							    		}
    							    	?>
    							    	<div class="content">
    							    		<strong class="title"><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
    
    										<span class="post_attribute"><?php echo get_the_time('F j, Y', $post->ID); ?></span>
    							      	</div>
    								</div>
    							  <?php
    									endwhile;
    
    									wp_reset_query();
    							  ?>
    							    </div>
    							    <br class="clear"/>
    							<?php
    							  }
    							}
    							?>
    
    							<?php
    								} //end if show related
    							?>
    
    							<?php comments_template( '' ); ?>
    							<?php comment_form(); ?>
    							<br class="clear"/>
    
    							<?php wp_link_pages(); endwhile; endif; ?>
    
    							</div>
    
    						</div>
    
    					</div>
    
    					<div class="sidebar_wrapper">
    						<div class="sidebar">
    
    							<div class="content">
    
    								<ul class="sidebar_widget">
    									<?php dynamic_sidebar('Single Post Sidebar'); ?>
    
    							</div>
    
    						</div>
    						<br class="clear"/>
    
    						<div class="sidebar_bottom"></div>
    					</div>
    
    				</div>
    				<!-- End main content -->
    
    				<br class="clear"/>
    			</div>
    
    			<div class="bottom"></div>
    
    		</div>
    		<!-- End content -->
    
    <?php get_footer(); ?>

    [please mark any posted code - or better, consider to use the pastebin - http://codex.wordpress.org/Forum_Welcome#Posting_Code - the above code is partly corrupted]

  2. jonradio
    Member
    Posted 2 years ago #

    Your code is getting corrupted when displayed here. Please read http://codex.wordpress.org/Forum_Welcome#Posting_Code especially the part about using pastebin.

  3. qulisyqultury
    Member
    Posted 2 years ago #

    cheers for help : here's the code i need a helping hand with

    http://pastebin.com/zGsXuhck

  4. qulisyqultury
    Member
    Posted 2 years ago #

    here's the ilustration of what i want to do

    http://img692.imageshack.us/img692/7402/fbplug.png

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags