Community Forums › Forums › Archived Forums › Design Tips and Tricks › Edit "Leave a Comment" text
This topic is: not resolved
Tagged: comments
- This topic has 4 replies, 2 voices, and was last updated 8 years, 11 months ago by James.
Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
June 1, 2015 at 12:37 pm #154423June 1, 2015 at 3:35 pm #154436JamesParticipant
where have you placed the code in your functions.php ?
June 1, 2015 at 3:46 pm #154439LeaChristineMemberIt is towards the very bottom, but I will just paste the entire thing here:
<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', 'Genesis Sample Theme' ); define( 'CHILD_THEME_URL', 'http://www.studiopress.com/' ); define( 'CHILD_THEME_VERSION', '2.1.2' ); //* Enqueue Google Fonts add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' ); function genesis_sample_google_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:300,400,700', array(), CHILD_THEME_VERSION ); } //* Add HTML5 markup structure add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Add support for custom background add_theme_support( 'custom-background' ); //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); //* Add section above posts on homepage genesis_register_sidebar( array( 'id' => 'menu-detail', 'name' => 'Menu Detail', 'description' => 'This is the detail on the edges of the menu bar.', ) ); add_action('genesis_before_content', 'menu_detail', 13 ); function menu_detail() { echo '<div class="menu-detail">'; dynamic_sidebar( 'menu-detail' ); echo '</div>'; } //* Add function for header image function sample_header_image() { ?><div class="header-image"> <a href="http://www.peekingbetweenthepages.com/"><img src="http://www.peekingbetweenthepages.com/wp-content/uploads/2015/05/HEADER2.png" /></a> </div> <?php } add_action( 'genesis_before_content', 'sample_header_image'); //* Reposition the primary navigation menu remove_action( 'genesis_after_header', 'genesis_do_nav' ); add_action( 'genesis_before_content', 'genesis_do_nav', 12 ); //* Customize the post info function add_filter( 'genesis_post_info', 'sp_post_info_filter' ); function sp_post_info_filter($post_info) { if ( !is_page() ) { $post_info = '[post_date]'; return $post_info; }} //* Move the post date function to above post title add_action( 'genesis_entry_footer', 'my_post_info', 5 ); add_filter( 'my_post_info', 'do_shortcode', 20 ); function my_post_info() { if ( 'page' === get_post_type() ) return; $output = genesis_markup( array( 'html5' => '<p %s>', 'xhtml' => '<div class="my-post-info">', 'context' => 'entry-meta-before-content', 'echo' => false, ) ); $output .= apply_filters( 'my_post_info', 'By [post_author_posts_link] [post_comments] [post_edit]' ); $output .= genesis_html5() ? '</p>' : '</div>'; echo $output; } //* Add Footer creds add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' ); function sp_footer_creds_text() { echo '<div class="creds"><p>'; echo 'Copyright © '; echo date('Y'); echo ' · <a href="#">Peeking Between The Pages</a>'; echo ' · Theme Design by<a href="http://www.leachristinedesigns.com/" target="_blank"> Lea Christine Designs</a>'; echo '</p></div>'; } //* Register scroll top widget area genesis_register_sidebar( array( 'id' => 'scroll-top', 'name' => __( 'Scroll To Top' ), 'description' => __( 'This is the button to scroll to top of the page' ), ) ); //* Hook social widget area before site footer add_action( 'genesis_after_content_sidebar_wrap', 'scroll_top', 9); function scroll_top() { genesis_widget_area( 'scroll-top', array( 'before' => '<div class="scroll-top">', 'after' => '</div>', ) ); } //* Register social footer widget area genesis_register_sidebar( array( 'id' => 'social-footer', 'name' => __( 'Social Footer', 'bg' ), 'description' => __( 'This is the social footer widget area.', 'bg' ), ) ); //* Hook social widget area before site footer add_action( 'genesis_footer', 'bg_social_footer_widget_area', 6 ); function bg_social_footer_widget_area() { genesis_widget_area( 'social-footer', array( 'before' => '<div class="social-footer">', 'after' => '</div>', ) ); } //* 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="Leave a Comment" one="1 Comment - Leave one" more="% Comments - Leave one"]'; } //* Display a custom favicon add_filter( 'genesis_pre_load_favicon', 'sp_favicon_filter' ); function sp_favicon_filter( $favicon_url ) { return 'http://www.peekingbetweenthepages.com/wp-content/uploads/2015/06/Favicon.png'; }
June 1, 2015 at 3:54 pm #154443JamesParticipantyou have 2 functions using ' sp_post_info_filter' , looks like it is an issue on Studiopress, they have given 2 functions the same name. that is why your getting the white screen.
//* Customize the post info function
and
//* Modify the comment link text in comments
just change the name for the comments function to something else, like 'sp_post_comments_filter'
//* Modify the comment link text in comments add_filter( 'genesis_post_info', 'sp_post_comments_filter' ); function sp_post_comments_filter( $post_info ) { return '[post_comments zero="Leave a Comment" one="1 Comment" more="% Comments"]'; }
let me know if that works
June 1, 2015 at 3:59 pm #154445JamesParticipantactually that may not work
post info and comments link are the same, so you only need either one
what is it you wish to do?
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.