• 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

Leave a Comment Text Won't Change

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 › Leave a Comment Text Won't Change

This topic is: not resolved
  • This topic has 5 replies, 3 voices, and was last updated 10 years, 1 month ago by mearl2005.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 8, 2014 at 1:29 pm #89360
    Tony
    Member

    I'm trying to change the "leave a comment" text site wide, but the code on the Studiopress website doesn't do anything. Here's what I'm using:

    //* Modify the comment link text in comments
    add_filter( 'genesis_post_info', 'sp_post_info_filter' );
    function sp_post_info_filter( $post_info ) {
    return '[post_comments zero="0" one="1" more="%"]';
    }

    Basically, I want the output to show the numbers only.

    Any ideas? This is on the Beautiful Pro theme.

    February 8, 2014 at 8:32 pm #89430
    nutsandbolts
    Member

    This tutorial walks you through several customizations for comments, including changing the "leave a comment" text: http://www.bourncreative.com/customizing-genesis-2-0-html5-comment-form/


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    February 9, 2014 at 7:16 am #89470
    Tony
    Member

    Hi Andrea,

    Thank you for the resource, but unless I didn't see it, it's not quite what I'm looking for.

    I'm referring to the "leave a comment" link that appears in the post info section, specifically the .entry-comments-link span class.

    This is where it shows how many comments the article has. I want to change it from the default "leave a comment" when there's zero comments to just display "0".

    The code I posted in the original post doesn't work, and I'm not sure why.

    February 9, 2014 at 7:39 am #89473
    Tony
    Member

    I was able to get the result I want by placing:

    [post_comments zero="0" one="1" more="%"]

    in the genesis_entry_header hook using the simple hooks plugin.

    It still would be nice to know how to accomplish this the right way in the functions.php file.

    February 9, 2014 at 3:02 pm #89526
    nutsandbolts
    Member

    Sorry, I just realized the tutorial I linked to wasn't even applicable to what you asked! I think I'm losing it. o_O

    Here's how you would do the same thing with a function - try this one and see if it works:

    //* Customize the post info function
    add_filter( 'genesis_entry_header', 'sp_post_info_filter' );
    function sp_post_info_filter($post_info) {
    if ( !is_page() ) {
    	$post_info = '[post_date] by [post_author_posts_link] [post_comments zero="0" one="1" more="%"] [post_edit]';
    	return $post_info;
    }}

    Now, that long line may need to be changed depending on whether you want the date, post author, etc. to be included. Let me know how it works out and whther it needs to be modified.


    Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
    I provide development and training services for designers • Find me on Twitter and Google+

    June 13, 2015 at 7:55 pm #156139
    mearl2005
    Member

    I am not finding that spot in the theme or my simple hooks. is there a new name for the genesis_entry_header?


    Melissa
    http://www.livingafrugallife.com

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 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