Skip to content

Instantly share code, notes, and snippets.

View nutsandbolts's full-sized avatar

Andrea Whitmer nutsandbolts

View GitHub Profile
@nutsandbolts
nutsandbolts / Change "Speak Your Mind" text
Created November 7, 2013 10:49
Change the "Speak Your Mind" header on Genesis comments
// Change default comment text
function nabm_change_comment_text($args) {
$args['title_reply'] = 'Leave a Comment';
return $args;
}
add_filter( 'genesis_comment_form_args', 'nabm_change_comment_text' );
@nutsandbolts
nutsandbolts / gist:7352697
Last active December 27, 2015 16:09
Automatically link Twitter names to Twitter URL in blog posts and comments (functions.php)
<?php
//* DO NOT include the opening PHP tag
//* Automatically link Twitter names to Twitter URL
function twtreplace($content) {
$twtreplace = preg_replace('/([^a-zA-Z0-9-_&])@([0-9a-zA-Z_]+)/',"$1<a href=\"http://twitter.com/$2\" target=\"_blank\" rel=\"nofollow\">@$2</a>",$content);
return $twtreplace;
}
@nutsandbolts
nutsandbolts / Custom Genesis footer
Last active December 27, 2015 16:09
Custom footer with no "back to top" link (customize and add to functions.php)
@nutsandbolts
nutsandbolts / Custom Genesis footer with back to top link
Created November 7, 2013 10:44
Custom footer with "back to top" link (customize and add to functions.php)
@nutsandbolts
nutsandbolts / Remove Genesis Author Box from bbPress Pages (HTML5) - add to functions.php
Last active December 27, 2015 02:59
Remove Genesis Author Box from bbPress Pages (HTML5 child themes)
// Remove author box from forums
add_action ('genesis_entry_footer', 'nabm_remove_author_box' );
function nabm_remove_author_box() {
if ( is_bbpress() ) {
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
remove_action( 'genesis_after_post', 'genesis_do_author_box_single', 8 );
}}
@nutsandbolts
nutsandbolts / Remove Genesis Author Box on bbPress Pages (XHTML) - add to functions.php
Last active December 27, 2015 02:58
Remove the Genesis author box from bbPress pages (XHTML child themes)
// Remove author box from forums
add_action ('genesis_after_post', 'nabm_remove_author_box' );
function nabm_remove_author_box() {
if ( is_bbpress() ) {
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );
}}