Community Forums › Forums › Archived Forums › Design Tips and Tricks › Leave a Comment Text Won't Change
- This topic has 5 replies, 3 voices, and was last updated 10 years, 11 months ago by
mearl2005.
-
AuthorPosts
-
February 8, 2014 at 1:29 pm #89360
Tony
MemberI'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 #89430nutsandbolts
MemberThis 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 #89470Tony
MemberHi 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 #89473Tony
MemberI 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 #89526nutsandbolts
MemberSorry, 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 #156139mearl2005
MemberI 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 -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.