Menu

How to Filter the Genesis Footer Creds

Giving some credit back to whoever helped with your genesis child theme is just good courtesy, may it be the coffee that keeps you going, plug-in used on your site, or even a company, freelancer or friend that helped in coding and/or designing. A link leading back to them in the footer is a great way to say your thanks.

Or maybe you are a freelancer, or a company that works with genesis and you want to put your name on your work. That is fine too.

So how can you? Sure, you can remove the entire footer in genesis, but if all you want to do is change the credit links, this is the way to go.

Simply just add the following code to your functions.php file in your child theme:

add_filter('genesis_footer_creds_text', 'custom_footer_creds_text');
function custom_footer_creds_text($creds) {
 $creds = '[footer_copyright]' . get_bloginfo('name') . ' • Built on the [footer_genesis_link] powered by [footer_wordpress_link]';
 return  $creds;
}

The code above will output

© 2010 Your Site Name Here • Built on the Genesis Theme Framework powered by WordPress

To customize this more to your needs change the string in $creds to anything you want. Remember to give credit back to the guys over at Studiopress for their awesome Framework.

Short link: http://goo.gl/XdYgn

How to Filter the Genesis Breadcrumb Trail

Breadcrumbs are a great way to add another form of navigation for users to easily find their way around sites as they dig deeper through articles and pages. In terms of usability, breadcrumbs can reduce the number of actions for users to return back to a higher level page that they were on a few moments before; and they are especially great to visually show someone’s location on sites if they just happened to land on a certain page through search, or a link.

Breadcrumbs can be enabled in the Genesis theme settings in the dashboard, where you will find four check boxes to have them either enabled or disabled on certain sections of sites. Once the breadcrumbs are activated, you should notice them above the content area. For example, if you are on your home page above the content area you should see: “You are here: Home” and if you want to change the text “You are here” or even the link to home, it is possible with a filter.

Below is an example on how to use the Genesis breadcrumb filter. The following snippet will change the default “you are here” text with an “x,” as well as use “>” for separators in place of the “/” and an image for the home link.

add_filter('genesis_breadcrumb_args', 'custom_breadcrumb_args');
function custom_breadcrumb_args($args) {
  	$args['labels']['prefix'] = 'x'; //marks the spot
  	$args['sep'] = '>';
  	$args['home'] = '<img src="'. get_bloginfo( 'stylesheet_directory' ) . '/images/homegraphic.png" alt="home">';
  	return $args;
}

To use the code above simply add it to your child theme’s function.php file and make any modifications you’d like.

List of all filterable items and their default values in the genesis breadcrumb trail are below.

 ['home'] = __('Home', 'genesis'),
 ['sep'] = '/',
 ['prefix']  = '<div class="breadcrumb">',
 ['suffix'] = '</div>',
 ['display'] = true
 ['labels']['prefix'] = __('You are here: ', 'genesis'),
 ['labels']['author'] = __('Archives for ','genesis'),
 ['labels']['tag'] = __('Archives for ','genesis'),
 ['labels']['date'] = __('Archives for ','genesis'),
 ['labels']['search'] = __('Search for ','genesis'),
 ['labels']['tax'] = __('Archives for ','genesis')
Short link: http://goo.gl/NnTgM