These are custom functions specific to the Graphene Theme.  I needed a place to store all the functions that I come across (or create) to extend the functionality of the Graphene Theme.

Limit Words in the Excerpt Areas

This function will control the count of words (not characters) in the excerpt areas.

function custom_excerpt_length($length) {
 return 55; // Change this word count to whatever you want.
add_filter('excerpt_length', 'custom_excerpt_length', 20 );


Change Dimensions of the Front Page Header Image

This function will adjust the width and height of the header image.

function graphene_custom_header_width(){
   return 960;  // The value of your custom width
function graphene_custom_header_height(){
   return 157;  // The value of your custom height
add_filter('graphene_header_image_width', 'graphene_custom_header_width');
add_filter('graphene_header_image_height', 'graphene_custom_header_height');

And this must be added to your child theme or custom css.

#header {
    width: 960px;  /* Must match value above */
    height: 157px;  /* Must match value above */


Change Default Text Strings

This function can help you change the text in hard coded text lines. For example, the “View Full Post” button, or the “Leave a Comment” link. NOTE: If you use this function for more than one translation, you will need to adjust the function name for each one to be unique.

function graphene_filter_gettext( $translated, $original, $domain ) {
	$strings = array(
		'View full post' => 'Read More', // "View Full Post" should be changed to the exact string you want to replace; "Read More" should be the exact string you want to use.
	if ( ! empty( $strings[$original] ) ) {
		$translations = &get_translations_for_domain( $domain );
		$translated = $translations->translate( $strings[$original] );
	return $translated;
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );