Home › Forums › WoodMart support forum › Related posts and featured image
Related posts and featured image
- This topic has 7 replies, 3 voices, and was last updated 6 years, 7 months ago by Stanley Black.
-
AuthorPosts
-
April 23, 2018 at 9:08 am #53930
Stanley BlackParticipantHello,
1.How to display related posts? They are enabled in theme settings but not show up.
2.How to remove featured image on post page? but I want to display that featured image in related posts and in theme blog element.
Kind regards
April 23, 2018 at 12:05 pm #53991
Elise NoromitMemberHello,
In order to display related posts, you need to create tags http://prntscr.com/j8yi8k and then put this tags into the posts. The posts having equal tags will be displayed as Related posts.
In order to hide the thumbnail image add this CSS code into Theme Settings > Custom CSS
.post-single-page.has-post-thumbnail .entry-header { display: none; }
Best Regards
April 23, 2018 at 6:36 pm #54141
Stanley BlackParticipantThanks!
April 23, 2018 at 6:57 pm #54154
Stanley BlackParticipantHello,
Where I can set related posts number?
Now is showing two related posts in carousel.I want to display 4 related posts.
Best regards
April 23, 2018 at 7:35 pm #54162
Elise NoromitMemberHello,
Related posts are presented as a slider and when you hover you will see navigations arrows and all the posts which contain the tag would be presented
Best Regards
April 23, 2018 at 7:48 pm #54164
Stanley BlackParticipantThanks for your response.
I now that, I want 4 related posts to show up in slider initially.
There is 8 related posts, now they show up two by two(four bullets for navigation).
I want to display them four by four.Best regards
April 24, 2018 at 6:18 am #54215
Artem TemosKeymasterYou can try to override our
single.php
file in the child theme with the following code<?php get_header(); $content_class = woodmart_get_content_class(); ?> <div class="site-content <?php echo esc_attr( $content_class ); ?>" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <div class="woodmart-single-footer"> <?php if( get_the_tag_list( '', ', ' ) ): ?> <div class="single-meta-tags"> <span class="tags-title"><?php esc_html_e('Tags', 'woodmart'); ?>:</span> <div class="tags-list"> <?php echo get_the_tag_list( '', ', ' ); ?> </div> </div> <?php endif; ?> <?php if ( woodmart_get_opt( 'blog_share' ) && woodmart_is_social_link_enable( 'share' ) ): ?> <div class="single-post-social"> <?php if( function_exists( 'woodmart_shortcode_social' ) ) echo woodmart_shortcode_social(array('type' => 'share', 'tooltip' => 'yes', 'style' => 'colored')) ?> </div> <?php endif ?> </div> <?php if ( woodmart_get_opt( 'blog_navigation' ) ) woodmart_posts_navigation(); ?> <?php if ( woodmart_get_opt( 'blog_related_posts' ) ) { $args = woodmart_get_related_posts_args( $post->ID ); $query = new WP_Query( $args ); if( function_exists( 'woodmart_generate_posts_slider' ) ) echo woodmart_generate_posts_slider(array( 'title' => esc_html__('Related Posts', 'woodmart'), 'el_class' => 'related-posts-slider', 'slides_per_view' => 4 ), $query); } ?> <?php comments_template(); ?> <?php endwhile; ?> </div><!-- .site-content --> <?php get_sidebar(); ?> <?php get_footer(); ?>
April 24, 2018 at 7:38 am #54251
Stanley BlackParticipantIt’s works, thanks!
-
AuthorPosts
The topic ‘Related posts and featured image’ is closed to new replies.
- You must be logged in to create new topics. Login / Register