How do I delete category om post slider and change date format to d.m.y (Ethos)?
Hello @SMDiekstra,
Thanks for asking.
- To hide category from post slider, please add following CSS code unde X > Launch > Options > CSS:
span.entry-cover-categories {display: none;}
-
Please add following code in your child theme function.php file to change date format:
// Entry Cover // ============================================================================= if ( ! function_exists( 'x_ethos_entry_cover' ) ) : function x_ethos_entry_cover( $location ) { if ( $location == 'main-content' ) { ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>"> <h2 class="h-entry-cover"><span><?php x_the_alternate_title(); ?></span></h2> </a> </article> <?php } elseif ( $location == 'post-carousel' ) { ?> <?php GLOBAL $post_carousel_entry_id; ?> <article <?php post_class(); ?>> <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>"> <h2 class="h-entry-cover"><span><?php ( $post_carousel_entry_id == get_the_ID() ) ? the_title() : x_the_alternate_title(); ?></span></h2> <div class="x-post-carousel-meta"> <span class="entry-cover-author"><?php echo get_the_author(); ?></span> <span class="entry-cover-categories"><?php echo x_ethos_post_categories(); ?></span> <span class="entry-cover-date"><?php echo get_the_date( 'd, m, Y' ); ?></span> <?php if ( has_tag() ) : ?> <footer class="entry-footer cf"> <?php echo get_the_tag_list( '<p><i class="x-icon-tags" data-x-icon=""></i>'. __( 'Tags:', '__x__'), ', ', '</p>' ); ?> </footer> <?php endif; ?> </div> </a> </article> <?php } } endif;
You can visit and use following resources to download and setup child theme:
https://theme.co/apex/child-themes
Thanks.
And how do I remove date and category?
Hi there,
You can do that by removing these lines in the code:
<span class="entry-cover-categories"><?php echo x_ethos_post_categories(); ?></span>
<span class="entry-cover-date"><?php echo get_the_date( 'd, m, Y' ); ?></span>
Hope this helps.
It didn’t work. See: www.sebasdiekstra.nl
Hi there,
Do you wish to remove the hover effect too? That’s because those are the only content upon hover, removing them will only display a blank overlay background. If you wish to remove it along with hover effect, then you should add this CSS to your global custom CSS.
.x-post-carousel.unstyled .entry-cover:hover .h-entry-cover {
top: 0;
}
There is no need to remove the date and categories with this.
Thanks!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.