This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Cleaning up the WordPress <head> section | |
*/ | |
function rb_cleanupheaderlinks() { | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* TODO: Replace cptname with name of custom post type | |
* TODO: Replace Screen Title Text Here with the content for the title box | |
*/ | |
function custom_cptname_title( $title ){ | |
$screen = get_current_screen(); | |
if ( 'cptname' == $screen->post_type ) { | |
$title = 'Screen Title Text Here'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Custom Category Archive | |
* | |
* | |
*/ | |
get_header(); ?> | |
<?php genesis_before_content_sidebar_wrap(); ?> | |
<div id="content-sidebar-wrap"> | |
<?php genesis_before_content(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
################################################################################ | |
// Custom Excerpt Filters | |
################################################################################ | |
function new_excerpt_more($more) { | |
global $post; | |
return ' ... <a href="'. get_permalink($post->ID) . '">Read more</a>'; | |
} | |
add_filter('excerpt_more', 'new_excerpt_more'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function rb_autoset_featured_img() { | |
global $post; | |
$already_has_thumb = has_post_thumbnail($post->ID); | |
if (!$already_has_thumb) { | |
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $attachment_id); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// added to functions.php | |
// via http://www.dannyherran.com/2012/03/mobile-browser-detection-for-wordpress-embedded-is_mobile-function/ | |
function is_mobile() | |
{ | |
if(preg_match('/(alcatel|amoi|android|avantgo|blackberry|benq|cell|cricket|docomo|elaine|htc|iemobile|iphone|ipad|ipaq|ipod|j2me|java|midp|mini|mmp|mobi|motorola|nec-|nokia|palm|panasonic|philips|phone|sagem|sharp|sie-|smartphone|sony|symbian|t-mobile|telus|up\.browser|up\.link|vodafone|wap|webos|wireless|xda|xoom|zte)/i', $_SERVER['HTTP_USER_AGENT'])) | |
return true; | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Rachel Baker | |
email = [email protected] | |
[core] | |
excludesfile = /Users/rachelbaker/.gitignore_global | |
autocrlf = input | |
quotepath = false | |
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
*._* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(window).load(function() { | |
var bodyHeight = jQuery(window).height(); | |
console.log('browser window height is ' +bodyHeight); | |
jQuery("section").css("height", bodyHeight); //resizing section element to be same height as window | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( 'bp_is_active' ) ) { | |
return false; | |
} |