• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Featured Posts Widget: Edit Comment Count

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Featured Posts Widget: Edit Comment Count

This topic is: resolved

Tagged: comment count format, featured posts widget

  • This topic has 2 replies, 1 voice, and was last updated 8 years, 1 month ago by nici-.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 15, 2018 at 4:22 pm #215434
    nici-
    Member

    Hi dear Genesis-Wizards!

    I want to show the comments-count in the featured image. I do so in blog page and single post here: https://www.shopanbieter.de/relaunch/news
    using the genesis_before_entry hook. SO no problem here.

    Other with the start page (News Pro child theme):
    https://www.shopanbieter.de/relaunch/

    I don't have any idea how to change the output here resp. add the comment_count (overlayed) to the featured image?

    If not, I might live with it as it is and might try to help myself with styling it somehow via CSS. But: Is there a way to change the output in order to just have the number without the word "comments". Can I do so in genesis/lib/widgets/featured-post-widget.php - if so, how?

    Best regards
    nici-

    https://www.shopanbieter.de/relaunch/
    January 15, 2018 at 5:12 pm #215436
    nici-
    Member

    Sorry, I forgot the code.

    I modified the featured image in blog page and single post this way:

    // Display featured image on top of single post and add comment count

    add_action( 'genesis_before_entry', 'featured_post_image', 8 );
    function featured_post_image() {
    // if ( !is_singular( 'post' ) ) return;
    print "<div class=\"featured-image\">";
    the_post_thumbnail('post-image');
    print "<div class=\"comment-icon\"><span class=\"dashicons dashicons-format-chat\"></span> ";
    print comments_number( '0', '1', '%');
    print "</div></div>";
    }

    [yes I might clean this up a bit, I am it's still testing around]

    And now I'd like to have the [blog_info] output in featured post widget on the start page similar with only the comment numbers as above (and icon, but I can add this via CSS so nevermind).

    January 16, 2018 at 1:51 pm #215454
    nici-
    Member

    I resolved it by editing the [post_comment] output format directly in the widget options to [post_comments zero="0" one="1" more="%"] and styling everything via css.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Featured Posts Widget: Edit Comment Count’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble