How can I remove the post slider from specific category pages, but keep it on my home page. How would I do this? Thank you in advance.
Hello There,
Thanks for writing in!
To remove the post slider from specific category pages, but keep it in your home page, please add the following CSS code in the X > Theme Options > Global CSS (http://prntscr.com/evui3r)
.category-name .x-flexslider.x-post-slider {
display: none;
}
Just make sure that you have inserted the correct category name.
Please let us know how it goes.
Hello again, I tried the code, and it’s not working.
Hello There,
Any of this code should work in your site:
.category-music .x-flexslider.x-post-slider {
display: none;
}
.category-culture .x-flexslider.x-post-slider {
display: none;
}
And please remove this pho from the custom css section because it is not the correct place to add the php code.
function add_author(){
if( is_singular('post') ){
$author_id = get_the_author_meta('ID');
echo do_shortcode('[author title="About the Author" author_id="'.$author_id.'"]');
}
}
add_action( 'x_before_the_content_end','add_author',10 );
// Custom Ethos Entry Meta // =============================================================================if ( ! function_exists( 'x_ethos_entry_meta' ) ):function x_ethos_entry_meta(){
//// Author.//$author = sprintf( ' %1$s %2$s</span>',__( 'by','__x__' ),get_the_author());
//// Date.//$date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>',esc_attr( get_the_date( 'c' ) ),esc_html( get_the_date() ));
//// Comments link.//if ( comments_open() ){
$title = apply_filters( 'x_entry_meta_comments_title',get_the_title() );
$link = apply_filters( 'x_entry_meta_comments_link',get_comments_link() );
$number = apply_filters( 'x_entry_meta_comments_number',get_comments_number() );
$text = ( 0 == $number ) ? __( 'Leave a Comment','__x__' ):sprintf( _n( '%s Comment','%s Comments',$number,'__x__' ),$number );
$comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments">%3$s</a></span>',esc_url( $link ),esc_attr( sprintf( __( 'Leave a comment on:“
%s”
','__x__' ),$title ) ),$text);
}
else{
$comments = '';
}
//// Output.//if ( x_does_not_need_entry_meta() ){
return;
}
else{
printf( '<p class="p-meta">%1$s%2$s%3$s</p>',$author,$date,$comments);
}
}
endif;
Please let us know how it goes.
I can’t find that code that you mentioned anywhere in my custom or global css. I also tried those codes again, and the post slide is still there.
IS there anyway you could screnshot a step by step or where it would be?
Thank you it worked! I have no idea why or what that code was supposed to be doing in there. Thank you again!
You’re most welcome!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.