Remove the Posted in under blog posts

Latest Reply from Betteridge at 2016-05-12 13:11:52 Solution
I am using a premium Apersfilm and would like to remove the "Posted in" line on all my posts

Please advise
Hi!

Could you clarify whether you want to remove the entire 'Posted in' line including date and categories or the only 'Posted in' text?
I would like to remove the whole line, including date and categories
Hi!

To edit the Post Meta Section you need to open the theloop.php file in the following directory:

\wp-content\themes\ampersfilm


And delete the following code:
//Post meta (comments, date, categories)
if (!is_page()) {?><p class='post-meta'>

<span class='post-date'><?php echo date('Y'); ?></span>

<?php echo $SMTheme->_('before-category'); ?> <?php echo the_category(' | ');

if(comments_open( get_the_ID() )) {
?> | <span class='post-comments'><?php comments_popup_link( $SMTheme->_( 'noresponses' ), $SMTheme->_( 'oneresponse' ), $SMTheme->_( 'multiresponse' ) ); ?></span>
<?php }
edit_post_link( $SMTheme->_( 'edit' ), ' | <span class="edit-link">', '</span>' );
?>
</p><?php } ?>
If I remove all of that code, then all my pages and posts are totally blank
Hi!

I'm sorry for confusing you. You need to remove the only following part of the code:

//Post meta (comments, date, categories)
if (!is_page()) {?><p class='post-meta'>

<span class='post-date'><?php echo date('Y'); ?></span>

<?php echo $SMTheme->_('before-category'); ?> <?php echo the_category(' | ');

if(comments_open( get_the_ID() )) {
?> | <span class='post-comments'><?php comments_popup_link( $SMTheme->_( 'noresponses' ), $SMTheme->_( 'oneresponse' ), $SMTheme->_( 'multiresponse' ) ); ?></span>
<?php }
edit_post_link( $SMTheme->_( 'edit' ), ' | <span class="edit-link">', '</span>' );
?>
</p><?php }


The only difference in code is closing php tag ('?>') at the end.
Perfect, Thanks Grace

Leave a reply

Add codeAdd image