Link to home
Start Free TrialLog in
Avatar of CSHTech
CSHTechFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Wordpress - remove metadata from Posts

Hi

I'm building a site for a business and need to remove the date, author, comment numbers, etc. from posts when they are displayed, as the posts dictate the images on the homepage (so they need to be present but not look like blog posts).

Can anyone tell me what I need to delete from single.php to prevent this metadata from being displayed?

(Can post the single.php if needed).

Thanks
Avatar of CSHTech
CSHTech
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Code is: -

 get_header(); ?>

<div class="section-container clearfix">

<div class="<?php echo $layout;?> text">

	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
		
        <p class="breadcrumb"><?php the_breadcrumb(); ?></p>
                
		<h1 class="index-title"><?php the_title(); ?> <?php edit_post_link('Edit',' / ',''); ?></h1>        
            
        <div <?php post_class('section single') ?> id="post-<?php the_ID(); ?>">
    
            <ul class="meta">          
               <li class="meta-time"><?php the_time('F jS, Y') ?></li>
               <li class="meta-comment"><?php comments_popup_link('Leave a comment &#187;', 'One comment so far &#187;', '% comments &#187;'); ?></li>
            </ul>
            
            <?php the_content('Continue reading &raquo;'); ?>
	
			<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
        
            <div class="navigation clearfix">
                <div class="alignleft"><?php previous_post_link('<p>&laquo; Previous Post</p><p>%link</p>') ?></div>
                <div class="alignright"><?php next_post_link('<p>Next Post &raquo;</p><p>%link</p>') ?></div>
            </div>	
        
            <div id="comments" class="comments">
                <?php comments_template('/comments.php',true); ?>
            </div>
	
		</div><!--Post Ends -->
        
</div><!-- Layout Ends -->


<div class="aside aside-right-image-<?php echo $layout; ?>">
	<?php if ( has_post_thumbnail() ) { ?>
        <?php the_post_thumbnail('single-image'); ?>
    <?php } ?>
	<?php if (strlen($aboutpost) > 0) { ?><h3><?php echo $aboutpost; ?></h3> <?php } else { ?><h3>About this post</h3><?php } ?>	
		<ul>
        	<li class="meta-category">Posted in <?php the_category(', '); ?></li>
		   	<?php the_tags('<li class="meta-tag">Tags: ', ', ', '</li>'); ?>
		</ul>
</div>


<?php endwhile; endif; ?>

<?php get_sidebar(); ?>

</div>

<?php get_footer(); ?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Heather Ritchey
Heather Ritchey
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CSHTech

ASKER

Thank you. The metadata doesn't appear on the Homepage, so all good there. :)

I've made the change to single.php but when viewing the Post page, you can still see the path to the post above the post: -

Bartholomew » Uncategorized » Post 2

and
 
Previous Post, Next Post and  "comments are closed" caption, as attached screenshot.

Is this editable from single.php also? User generated image
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CSHTech

ASKER

Dzynit,

Deleted the code you advised and it's looking much better, thanks. The only thing left is the lower white area where it says 'comments are closed'. Any thoughts..?

(jeremyjared74: - many thanks for your input)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CSHTech

ASKER

Many thanks for your help!