Getting rid of author, date and comments on posts
Is there any way to delete this on all my posts/pages
Hi Yes there certainly is. Involves a little editing of the code, but not much at all. If you edit single.php and page.php and change/remove the following lines
<div class="metabox">
Posted by <?php the_author_posts_link () ?> |
Filed under <?php the_category(', ') ?> |
<?php the_time('M j, Y') ?> |
<?php the_tags('Tags: ', ', ', ' | '); ?>
<?php comments_popup_link(' No Comments', ' 1 Comment', ' % Comments'); ?>
</div>
Thats all the meta for each post. Ill break it down so you can see which is which
Posted by <?php the_author_posts_link () ?> |
Thats the posted by code, so if you dont want the author name, get rid of that bit.
Filed under <?php the_category(', ') ?> |
Above code is the Category links, so delete that if you dont want the categories showing.
<?php the_time('M j, Y') ?> |
Above is the time the post was created, so you can do away with that if you wish.
<?php the_tags('Tags: ', ', ', ' | '); ?>
Above are the tags, again delete as necessary.
<?php comments_popup_link(' No Comments', ' 1 Comment', ' % Comments'); ?>
And finally, above is the comments, just delete that line to get rid of the comments.
As you can see, it breaks down into lines, so this should be easier for you to delete as necessary.
15 Responses to “Getting rid of author, date and comments on posts”
You must be logged in to post a comment.






sibulat:
hello, can u give me the code to re size the font, e.g from 12 to 6? tq
IamDeirdre:
Hi,
I’m having a similar problem, changing the “page.php” & “single.php” files change the page and single post pages of course, however when there are multiple posts on a single page in a blog style it doesn’t seem to be recognizing the removal.
More simply, how do we remove the meta info from the pages that have multiple posts in a “blog-style” page please.
Thanks!
IamDeirdre:
Never-mind!
I found it, go into the
42k theme folder > bricks > homepage > then modify the “a-normal.php” file the same way as single.php & page.php. Worked for me.