Title: Exclude postinfo
Last modified: August 19, 2016

---

# Exclude postinfo

 *  [cribbe83](https://wordpress.org/support/users/cribbe83/)
 * (@cribbe83)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/)
 * I want to be able to:
 * 1. Exclude info on posts, everything about the post such as date, category and
   who wrote it.
 * 2. Exclude the comment service, so users can’t leave comments.
 * About 1. Iv’e found a widget that excluded the date but not the other things.
 * Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [thelastknight](https://wordpress.org/support/users/thelastknight/)
 * (@thelastknight)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/#post-1036561)
 * You can do this by editing `single.php` in your theme folder. What’s the code
   in your `single.php`‘s loop?
 *  Thread Starter [cribbe83](https://wordpress.org/support/users/cribbe83/)
 * (@cribbe83)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/#post-1036563)
 * <?php get_header(); ?>
 *  <!– posts –>
    <div id=”posts” class=”span-16 prepend-1 append-1″> <?php if (
   have_posts()) : ?>
 *  <?php while (have_posts()) : the_post(); ?>
 *  <div class=”post” id=”post-<?php the_ID(); ?>”>
    <div class=”postheader”> <div
   class=”commentcount”> “> <img src=”<?php bloginfo(‘template_directory’); ?>/images/
   commentsicon.gif” alt=”<?php comments_number(__(‘No Comments’), __(‘1 Comment’),
   __(‘% Comments’)); ?>” /> <?php comments_number(__(‘0’), __(‘1’), __(‘%’)) ?>
   </div> <div class=”posttitle”> <h2>” rel=”bookmark” title=”<?php the_title();?
   >”><?php the_title(); ?></h2> <span class=”postmeta”><?php the_time(‘l, F jS,
   Y’); ?> | <?php the_category(‘, ‘); ?> | <?php the_author_link(); ?> </span> 
   </div> </div> <div class=”postcontent”><?php the_content(__(‘Continue reading…’));?
   ></div> <div class=”posttags”><?php the_tags(‘Tags: ‘, ‘, ‘, ”); ?></div> </div
   >
 *  <?php comments_template(); ?>
 *  <?php endwhile; ?>
 *  <div class=”navlinks”>
    [<img src=”<?php bloginfo(‘template_directory’); ?>/images/backtotopicon.gif” alt=”Back to top” />Back to top](https://wordpress.org/support/topic/exclude-postinfo/?output_format=md#posts)
   </div>
 *  <?php else : ?>
 *  <div class=”post”>
    <h2>Not found!</h2> <p><?php _e(‘Sorry, this page does not
   exist.’); ?></p> <?php include (TEMPLATEPATH . “/searchform.php”); ?> </div>
 * <?php endif; ?>
    </div>
 * <?php get_sidebar(); ?>
 * <?php get_footer(); ?>
 *  [thelastknight](https://wordpress.org/support/users/thelastknight/)
 * (@thelastknight)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/#post-1036566)
 * I’ve commented the lines out which you need to remove entirely if don’t want 
   these features. You can turn comments off within the WordPress admin area also.
 *     ```
       <?php get_header(); ?>
   
       <!-- posts -->
       <div id="posts" class="span-16 prepend-1 append-1">
       <?php if (have_posts()) : ?>
   
       <?php while (have_posts()) : the_post(); ?>
   
       <div class="post" id="post-<?php the_ID(); ?>">
       <div class="postheader">
       <div class="commentcount">
       ">
       <img src="<?php bloginfo('template_directory'); ?>/images/commentsicon.gif" alt="<?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments')); ?>" />
       <?php comments_number(__('0'), __('1'), __('%')) ?>
   
       </div>
       <div class="posttitle">
       <h2>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></h2>
       <!-- <span class="postmeta"><?php  /* the_time('l, F jS, Y'); */ ?> | <?php /* the_category(', '); */ ?> | <?php /* the_author_link(); */ ?> </span> -->
       </div>
       </div>
       <div class="postcontent"><?php the_content(__('
       Continue reading...')); ?></div>
       <div class="posttags"><?php the_tags('Tags: ', ', ', ''); ?></div>
       </div>
   
       <?php /*  comments_template(); */ ?>
   
       <?php endwhile; ?>
   
       <div class="navlinks">
       <img src="<?php bloginfo('template_directory'); ?>/images/backtotopicon.gif" alt="Back to top" />Back to top
       </div>
   
       <?php else : ?>
   
       <div class="post">
       <h2>Not found!</h2>
       <p><?php _e('Sorry, this page does not exist.'); ?></p>
       <?php include (TEMPLATEPATH . "/searchform.php"); ?>
       </div>
   
       <?php endif; ?>
       </div>
   
       <?php get_sidebar(); ?>
   
       <?php get_footer(); ?>
       ```
   
 *  [thelastknight](https://wordpress.org/support/users/thelastknight/)
 * (@thelastknight)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/#post-1036568)
 * Oh I just noticed the code you posted is broken on this line.
 * Change.
 * `<h2>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></h2
   >`
 * to
 *     ```
       <h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></h2>
       ```
   
 *  Thread Starter [cribbe83](https://wordpress.org/support/users/cribbe83/)
 * (@cribbe83)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/#post-1036570)
 * Thank you very much,
 * Did you change the code so It’s just for me to copy/paste?
 * Cause I cants see any comments in the code?
 *  Thread Starter [cribbe83](https://wordpress.org/support/users/cribbe83/)
 * (@cribbe83)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/#post-1036581)
 * I deleted theese lines, since I guess it was theese you ment, but it dint change
   anything?
 * /* comments_template(); */
 * /* the_time(‘l, F jS, Y’); */
 * */ ?> | <?php /* the_author_link(); */
 * /* the_category(‘, ‘); */
 *  Thread Starter [cribbe83](https://wordpress.org/support/users/cribbe83/)
 * (@cribbe83)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/#post-1036582)
 * Ok, I fixed it, I had to change the index.php file aswell

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Exclude postinfo’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [cribbe83](https://wordpress.org/support/users/cribbe83/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/exclude-postinfo/#post-1036582)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
