I’m trying to remove the date from the recent post element. I’ve shut down the post meta data option in the customizer. But that doesn’t remove it from the recent post element. Does anyone have any quick code for that?
Hi there,
Please add this code in the custom CSS:
.x-recent-posts .x-recent-posts-date {
display: none;
}
Hope this helps.
I am trying to accomplish the same - I’ve tried many codes I found on other examples and none works. I need to remove the recent post date - also need to remove author and date from all post period.
Please help.
Lucy
Hi Lucy,
The recent post element does not display the author so you might be talking about the post meta for the blog items. If that’s the case, go to X > Theme Options > Blog then disable the post meta option.
If this doesn’t work and you’re referring to something else, please send us the link to the page in question so that we can check.
Thank you.
It did work - however when I got to the news page the top post still shows the date, how can I remove that as well.
Hey @LucyKeile,
Please install and activate the child theme and login through FTP then edit the functions.php then add this code:
// Featured Index Content
// =============================================================================
if ( ! function_exists( 'x_ethos_featured_index' ) ) :
function x_ethos_featured_index() {
$entry_id = get_the_ID();
$index_featured_layout = get_post_meta( $entry_id, '_x_ethos_index_featured_post_layout', true );
$index_featured_size = get_post_meta( $entry_id, '_x_ethos_index_featured_post_size', true );
$index_featured_layout_class = ( $index_featured_layout == 'on' ) ? ' featured' : '';
$index_featured_size_class = ( $index_featured_layout == 'on' ) ? ' ' . strtolower( $index_featured_size ) : '';
$is_index_featured_layout = $index_featured_layout == 'on' && ! is_single();
?>
<a href="<?php the_permalink(); ?>" class="entry-thumb<?php echo $index_featured_layout_class; echo $index_featured_size_class; ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
<?php if ( $is_index_featured_layout ) : ?>
<span class="featured-meta"><?php echo x_ethos_post_categories(); ?></span>
<h2 class="h-featured"><span><?php x_the_alternate_title(); ?></span></h2>
<span class="featured-view"><?php _e( 'View Post', '__x__' ); ?></span>
<?php else : ?>
<span class="view"><?php _e( 'View Post', '__x__' ); ?></span>
<?php endif; ?>
</a>
<?php
}
endif;
Hope this helps.
I am already using a child theme. Is there any other way to accomplish this? this so complicated.
Hi Lucy,
Unfortunately, that is the only way to get rid of the date that is in the featured post area for the Ethos stack.
If you want to get rid of the category and the date, it would be easier by adding this CSS code in the Global CSS:
.x-slides .featured-meta {
display: none;
}
Hope this helps.
that works perfectly. Thank you!
You’re most welcome, Lucy.