Digital experiences for all disciplines
New Landing › How can we help? › General › Feedback & Suggestions › Removing " / 0 Comments"
New Landing › How can we help? › General › Feedback & Suggestions › Removing " / 0 Comments"
- This topic has 6 replies, 3 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Feedback & Suggestions
-
January 19, 2016 at 6:58 pm #242035
Hello,
I selected the “Mini” Blog type for my blog page.
I wanted to remove the comments on each pages. That was done. No problem.Now I see that “0 Comments” is still showing on the archive page (not the single blog page).
How do I remove that?
I thought I could remove this in the ” post-meta-details-mini.php” file. However, this did not work.Please let me know how to remove this.
Thank you
Attachments:
You must be logged in to view attached files.January 19, 2016 at 7:27 pm #242053Hi,
Test this custom CSS:
.mini-item-details time { display: none; }
Thanks.
January 19, 2016 at 7:55 pm #242065That removed the date.
The ‘0 Comments’ is still there.
January 19, 2016 at 11:09 pm #242099Anything else I could try ?
January 20, 2016 at 7:19 am #242128Hi,
Please paste this code at function.php file of theme.function sf_get_post_item( $postID, $blog_type, $show_title = "yes", $show_excerpt = "yes", $show_details = "yes", $excerpt_length = "20", $content_output = "excerpt", $show_read_more = "yes", $fullwidth = "no" ) { $post_item = $image_id = ""; global $sf_options, $sf_sidebar_config; $single_author = $sf_options['single_author']; $remove_dates = $sf_options['remove_dates']; $post_links_match_thumb = false; if ( isset( $sf_options['post_links_match_thumb'] ) ) { $post_links_match_thumb = $sf_options['post_links_match_thumb']; } $post_format = get_post_format( $postID ); if ( $post_format == "" ) { $post_format = 'standard'; } if ( $blog_type == "masonry" ) { $content_output = "excerpt"; } $comments_icon = apply_filters( 'sf_comments_icon', '<i class="ss-chat"></i>' ); $link_icon = apply_filters( 'sf_link_icon', '<i class="ss-link"></i>' ); $sticky_icon = apply_filters( 'sf_sticky_icon', '<i class="ss-bookmark"></i>' ); $post_type = get_post_type( $postID ); $post_title = get_the_title(); $post_author = get_the_author(); $post_date = get_the_date(); $post_date_str = get_the_date('Y-m-d'); $post_categories = get_the_category_list( ', ' ); $post_comments = get_comments_number(); $post_permalink = get_permalink(); $custom_excerpt = sf_get_post_meta( $postID, 'sf_custom_excerpt', true ); $post_excerpt = ''; if ( $content_output == "excerpt" ) { if ( $custom_excerpt != '' ) { $post_excerpt = sf_custom_excerpt( $custom_excerpt, $excerpt_length ); } else { if ( $post_format == "quote" ) { $post_excerpt = sf_get_the_content_with_formatting(); } else { $post_excerpt = sf_excerpt( $excerpt_length ); } } } else { $post_excerpt = sf_get_the_content_with_formatting(); } if ( $post_format == "chat" ) { $post_excerpt = sf_content( 40 ); } else if ( $post_format == "audio" ) { $post_excerpt = do_shortcode( get_the_content() ); } else if ( $post_format == "video" ) { $content = get_the_content(); $content = apply_filters( 'the_content', $content ); $post_excerpt = $content; } else if ( $post_format == "link" ) { $content = get_the_content(); $content = apply_filters( 'the_content', $content ); $post_excerpt = $content; } $post_permalink_config = 'href="' . $post_permalink . '" class="link-to-post"'; if ( $post_links_match_thumb ) { $link_config = sf_post_item_link(); $post_permalink_config = $link_config['config']; } $thumb_type = sf_get_post_meta( $postID, 'sf_thumbnail_type', true ); $download_button = sf_get_post_meta( $postID, 'sf_download_button', true ); $download_file = sf_get_post_meta( $postID, 'sf_download_file', true ); $download_text = apply_filters( 'sf_post_download_text', __( "Download", "swiftframework" ) ); $download_shortcode = sf_get_post_meta( $postID, 'sf_download_shortcode', true ); if ( $blog_type == "masonry" ) { $post_item .= apply_filters( 'sf_before_masonry_post_thumb' , ''); } // THUMBNAIL MEDIA TYPE SETUP $item_figure = ""; if ( $thumb_type != "none" ) { $item_figure .= sf_post_thumbnail( $blog_type, $fullwidth ); } // DETAILS SETUP $item_details = ""; if ( $single_author && ! $remove_dates ) { $item_details .= '<div class="blog-item-details">' . sprintf( __( 'In %1$s on <time datetime="%2$s">%3$s</time>', 'swiftframework' ), $post_categories, $post_date_str, $post_date ) . '</div>'; } else if ( ! $remove_dates ) { $item_details .= '<div class="blog-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> in %3$s on <time datetime="%4$s">%5$s</time>', 'swiftframework' ), $post_author, get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_categories, $post_date_str, $post_date ) . '</div>'; } else if ( ! $single_author ) { $item_details .= '<div class="blog-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> in %3$s', 'swiftframework' ), $post_author, get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_categories ) . '</div>'; } $mini_details = ""; if ( $single_author && ! $remove_dates ) { $mini_details .= '<div class="mini-item-details">' . sprintf( __( 'in %1$s / <time datetime="%2$s">%3$s</time>', 'swiftframework' ), $post_categories, $post_date_str, $post_date ) . '</div>'; } else if ( ! $remove_dates ) { $mini_details .= '<div class="mini-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> in %3$s / <time datetime="%4$s">%5$s</time>', 'swiftframework' ), $post_author, get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_categories, $post_date_str, $post_date ) . '</div>'; } else if ( ! $single_author ) { $mini_details .= '<div class="mini-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> / %3$s ', 'swiftframework' ), $post_author, get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_categories) . '</div>'; } // BOLD STYLING if ( $blog_type == "bold" ) { $post_item .= '<div class="bold-item-wrap">'; if ( $show_title == "yes" && $post_format != "quote" && $post_format != "link" ) { $post_item .= '<h1 itemprop="name headline"><a ' . $post_permalink_config . '>' . $post_title . '</a></h1>'; } else if ( $post_format == "quote" ) { $post_item .= '<div class="quote-excerpt" itemprop="name headline"><a ' . $post_permalink_config . '>' . $post_excerpt . '</a></div>'; } else if ( $post_format == "link" ) { $post_item .= '<h3 itemprop="name headline"><a ' . $post_permalink_config . '>' . $post_title . '</a></h3>'; } if ( $show_excerpt == "yes" && $post_format != "quote" ) { $post_item .= '<div class="excerpt" itemprop="description">' . $post_excerpt . '</div>'; } if ( $show_details == "yes" ) { if ( $single_author && !$remove_dates ) { $post_item .= '<div class="blog-item-details">' . sprintf( __( '<span>In %1$s</span> <time class="date" datetime="%2$s">%3$s</time>', 'swiftframework' ), $post_categories, $post_date_str, $post_date ) . '</div>'; } else if ( ! $remove_dates ) { $post_item .= '<div class="blog-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> <span>in %3$s</span> <time class="date" datetime="%4$s">%5$s</time>', 'swiftframework' ), $post_author, get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_categories, $post_date_str, $post_date ) . '</div>'; } else if ( ! $single_author ) { $post_item .= '<div class="blog-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> <span>in %3$s</span>', 'swiftframework' ), $post_author, get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_categories ) . '</div>'; } } $post_item .= '</div>'; } else if ( $blog_type == "masonry" ) { if ( $item_figure != "" ) { $post_item .= $item_figure; } $post_item .= '<div class="details-wrap">'; $post_item .= '<a ' . $post_permalink_config . '></a>'; if ( $post_type == "post" ) { if ( $post_format == "standard" ) { $post_item .= '<h6>' . __( "Article", "swiftframework" ) . '</h6>'; } else { $post_item .= '<h6>' . $post_format . '</h6>'; } } else { $post_item .= '<h6>' . $post_type . '</h6>'; } if ( $show_title == "yes" && $post_format != "quote" && $post_format != "link" ) { $post_item .= '<h2 itemprop="name headline">' . $post_title . '</h2>'; } else if ( $post_format == "quote" ) { $post_item .= '<div class="quote-excerpt" itemprop="name headline">' . $post_excerpt . '</div>'; } else if ( $post_format == "link" ) { $post_item .= '<h3 itemprop="name headline">' . $post_title . '</h3>'; } if ( sf_theme_opts_name() == "sf_atelier_options" ) { if ( $show_details == "yes" ) { $post_item .= sf_get_post_details($postID); } if ( $show_excerpt == "yes" && $post_format != "quote" ) { $post_item .= '<div class="excerpt" itemprop="description">' . $post_excerpt . '</div>'; } if ( $show_read_more == "yes" ) { if ( $download_button ) { if ( $download_shortcode != "" ) { $post_item .= do_shortcode( $download_shortcode ); } else { $post_item .= '<a href="' . wp_get_attachment_url( $download_file ) . '" class="download-button read-more-button">' . $download_text . '</a>'; } } $post_item .= '<a class="read-more-button" href="' . get_permalink() . '">' . __( "Read more", "swiftframework" ) . '</a>'; } if ( $show_details == "yes" ) { $post_item .= '<div class="comments-likes">'; if ( comments_open() ) { $post_item .= '<div class="comments-wrapper"><a href="' . $post_permalink . '#comment-area"> <svg version="1.1" class="comments-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve"> <path fill="none" class="stroke" stroke="#252525" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d=" M13.958,24H2.021C1.458,24,1,23.541,1,22.975V2.025C1,1.459,1.458,1,2.021,1h25.957C28.542,1,29,1.459,29,2.025v20.949 C29,23.541,28.542,24,27.979,24H21v5L13.958,24z"/> </svg> <span>' . $post_comments . '</span></a></div>'; } if ( function_exists( 'lip_love_it_link' ) ) { $post_item .= lip_love_it_link( get_the_ID(), false ); } $post_item .= '</div>'; } } else { if ( $show_excerpt == "yes" && $post_format != "quote" ) { $post_item .= '<div class="excerpt" itemprop="description">' . $post_excerpt . '</div>'; } if ( $show_details == "yes" ) { $post_item .= sf_get_post_details($postID); $post_item .= '<div class="comments-likes">'; if ( comments_open() ) { $post_item .= '<div class="comments-wrapper"><a href="' . $post_permalink . '#comment-area">'.$comments_icon.'<span>' . $post_comments . '</span></a></div>'; } if ( function_exists( 'lip_love_it_link' ) ) { $post_item .= lip_love_it_link( $postID, false ); } $post_item .= '</div>'; } } $post_item .= '</div>'; // MINI STYLING } else if ( $blog_type == "mini" ) { $post_item .= '<div class="mini-blog-item-wrap clearfix">'; if ( $post_format == "quote" || $post_format == "link" ) { $post_item .= '<div class="mini-alt-wrap">'; } else { $post_item .= $item_figure; } $post_item .= '<div class="blog-details-wrap clearfix">'; if ( $show_title == "yes" && $post_format != "quote" && $post_format != "link" ) { $post_item .= '<h3 itemprop="name headline"><a ' . $post_permalink_config . '>' . $post_title . '</a></h3>'; } if ( $show_details == "yes" && $post_format != "quote" && $post_format != "link" ) { if ( sf_theme_opts_name() == "sf_atelier_options" ) { $post_item .= $mini_details; } else { $post_item .= $item_details; } } if ( $show_excerpt == "yes" ) { if ( $post_format == "quote" ) { $post_item .= '<div class="quote-excerpt heading-font" itemprop="description">' . $post_excerpt . '</div>'; } else if ( $post_format == "link" ) { $post_item .= '<div class="link-excerpt heading-font" itemprop="description">' . $link_icon . $post_excerpt . '</div>'; } else { $post_item .= '<div class="excerpt" itemprop="description">' . $post_excerpt . '</div>'; } } if ( is_sticky() ) { $post_item .= '<div class="sticky-post-icon">'.$sticky_icon.'</div>'; } if ( $show_read_more == "yes" ) { if ( $download_button ) { if ( $download_shortcode != "" ) { $post_item .= do_shortcode( $download_shortcode ); } else { $post_item .= '<a href="' . wp_get_attachment_url( $download_file ) . '" class="download-button read-more-button">' . $download_text . '</a>'; } } $post_item .= '<a class="read-more-button" href="' . get_permalink() . '">' . __( "Read more", "swiftframework" ) . '</a>'; } if ( $show_details == "yes" ) { $post_item .= '<div class="comments-likes">'; if ( $post_format == "quote" || $post_format == "link" ) { $post_item .= $item_details; } if ( comments_open() ) { $post_item .= '<div class="comments-wrapper"><a href="' . $post_permalink . '#comment-area">'.$comments_icon.'<span>' . $post_comments . '</span></a></div>'; } if ( function_exists( 'lip_love_it_link' ) ) { $post_item .= lip_love_it_link( $postID, false ); } $post_item .= '</div>'; } $post_item .= '</div>'; if ( $post_format == "quote" || $post_format == "link" ) { $post_item .= '</div>'; } $post_item .= '</div>'; // STANDARD STYLING } else { if ( sf_theme_opts_name() == "sf_atelier_options" && $show_details == "yes" && $blog_type != "timeline" ) { $post_item .= '<div class="side-details">'; if ( !$remove_dates ) { $post_date_month = get_the_date('M'); $post_date_day = get_the_date('d'); $post_date_year = get_the_date('Y'); $post_item .= '<div class="side-post-date narrow-date-block" itemprop="datePublished"><span class="month">'.$post_date_month.'</span><span class="day">'.$post_date_day.'</span><span class="year">'.$post_date_year.'</span></div>'; } if ( comments_open() ) { $post_item .= '<div class="comments-wrapper narrow-date-block"><a href="' . $post_permalink . '#comment-area"> <svg version="1.1" class="comments-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve"> <path fill="none" class="stroke" stroke="#252525" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d=" M13.958,24H2.021C1.458,24,1,23.541,1,22.975V2.025C1,1.459,1.458,1,2.021,1h25.957C28.542,1,29,1.459,29,2.025v20.949 C29,23.541,28.542,24,27.979,24H21v5L13.958,24z"/> </svg> <span>' . $post_comments . '</span></a></div>'; } if ( function_exists( 'lip_love_it_link' ) ) { $post_item .= lip_love_it_link( get_the_ID(), false, '', 'narrow-date-block' ); } $post_item .= '</div>'; $post_item .= '<div class="post-content-wrap">'; } if ( $show_details == "yes" && $blog_type == "timeline" ) { $post_item .= '<span class="standard-post-date" itemprop="datePublished">' . $post_date . '</span>'; } $post_item .= $item_figure; if ( $item_figure == "" ) { $post_item .= '<div class="standard-post-content no-thumb clearfix">'; // open standard-post-content } else { $post_item .= '<div class="standard-post-content clearfix">'; // open standard-post-content } if ( $show_title == "yes" && $post_format != "link" && $post_format != "quote" ) { $post_item .= '<h1 itemprop="name headline"><a ' . $post_permalink_config . '>' . $post_title . '</a></h1>'; } if ($show_details == "yes" && $post_format != "quote" && $post_format != "link" ) { if ( sf_theme_opts_name() == "sf_atelier_options" ) { if ( ! $single_author ) { $post_item .= '<div class="blog-item-details">' . sprintf( __( '<span class="author">By <a href="%2$s" rel="author" itemprop="author">%1$s</a></span> in %3$s', 'swiftframework' ), $post_author, get_author_posts_url( get_the_author_meta( 'ID' ) ), $post_categories ) . '</div>'; } } else { $post_item .= $item_details; } } if ( $show_excerpt == "yes" ) { $post_item .= '<div class="excerpt" itemprop="description">' . $post_excerpt . '</div>'; } else if ( $post_format == "quote" ) { $post_item .= '<div class="quote-excerpt heading-font" itemprop="description">' . $post_excerpt . '</div>'; } else if ( $post_format == "link" ) { $post_item .= '<div class="link-excerpt heading-font" itemprop="description">' . $link_icon . $post_excerpt . '</div>'; } if ( is_sticky() ) { $post_item .= '<div class="sticky-post-icon">'.$sticky_icon.'</div>'; } if ( $download_button ) { if ( $download_shortcode != "" ) { $post_item .= do_shortcode( $download_shortcode ); } else { $post_item .= '<a href="' . wp_get_attachment_url( $download_file ) . '" class="download-button read-more-button">' . $download_text . '</a>'; } } if ( $show_read_more == "yes" && $post_format != "quote" && $post_format != "link" ) { $post_item .= '<a class="read-more-button" href="' . get_permalink() . '">' . __( "Read more", "swiftframework" ) . '</a>'; } if ( $show_details == "yes" ) { $post_item .= '<div class="comments-likes">'; if ( $post_format == "quote" || $post_format == "link" ) { $post_item .= $item_details; } if ( comments_open() ) { $post_item .= '<div class="comments-wrapper"><a href="' . $post_permalink . '#comment-area">'.$comments_icon.'<span>' . $post_comments . '</span></a></div>'; } if ( function_exists( 'lip_love_it_link' ) ) { $post_item .= lip_love_it_link( get_the_ID(), false ); } $post_item .= '</div>'; } $post_item .= '</div>'; // close standard-post-content if ( sf_theme_opts_name() == "sf_atelier_options" && $show_details == "yes" && $blog_type != "timeline" ) { $post_item .= '</div>'; // close post-content-wrap } // $post_item = sf_get_content_view( 'post', 'standard', true ); // return $post_item; } return $post_item; }
Thanks
MohammadJanuary 20, 2016 at 6:29 pm #242327wow !
ok that worked.
Seems a bit excessive but it worked .
Thank you. Much appreciated.January 20, 2016 at 6:36 pm #242328Hi,
You most welcome and glad to help you.
Thanks
Mohammad -
Posted in: Feedback & Suggestions
You must be logged in and have valid license to reply to this topic.