Skip to content

Instantly share code, notes, and snippets.

Rick R. Duncan rickrduncan

Block or report user

Report or block rickrduncan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View genesis-breadcrumb-relocate.php
<?php
//* Do NOT include the opening php tag
//* Reposition the Genesis breadcrumb to bottom of page
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'genesis_entry_footer', 'genesis_do_breadcrumbs' );
View genesis-breadcrumb-remove.php
<?php
//* Do NOT include the opening php tag
//* Remove breadcrumb from a single page
//* https://codex.wordpress.org/Function_Reference/is_page
function b3m_remove_genesis_breadcrumb() {
if ( is_page( 'resources' ) ) {
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
}
}
View genesis-breadcrumb-author-label.php
<?php
//* Do NOT include the opening php tag
//* Prefix author breadcrumb trail with the text 'Articles written by'
function b3m_prefix_author_breadcrumb( $args ) {
$args['labels']['author'] = 'Articles written by ';
return $args;
View genesis-breadcrumb-separator.php
<?php
//* Do NOT include the opening php tag
//* Change the breadcrumb separator
function b3m_change_breadcrumb_separator( $args ) {
$args['sep'] = ' &rsaquo; ';
return $args;
View genesis-breadcrumb-home-link.php
View genesis-home-text-breadcrumb.php
<?php
//* Do NOT include the opening php tag
//* Change the text at the front of breadcrumb trail
function b3m_home_text_breadcrumb( $args ) {
$args['home'] = 'CUSTOM TEXT HERE';
return $args;
View genesis-breadcrumb-prefix.php
<?php
//* Do NOT include the opening php tag
//* Remove 'You are here' from the front of breadcrumb trail
function b3m_prefix_breadcrumb( $args ) {
$args['labels']['prefix'] = '';
return $args;
}
View genesis-breadcrumb-args.php
<?php
//* Do NOT include the opening php tag
//* Default arguments from the Genesis Breadcrumb
//* genesis/lib/classes/breadcrumb.php
public function __construct() {
//* Default arguments
$this->args = array(
'home' => __( 'Home', 'genesis' ),
'sep' => __( ' <span aria-label="breadcrumb separator">/</span> ', 'genesis' ),
'list_sep' => ', ',
View dashicon-search-button-genesis.php
<?php
//* Do NOT include the opening php tag
//* Use dashicon for search button
//* http://melchoyce.github.io/dashicons/
add_filter( 'genesis_search_button_text', 'b3m_search_button_dashicon' );
function b3m_search_button_dashicon( $text ) {
return esc_attr( '&#xf179;' );
View enqueue-dashicons.php
<?php
//* Do NOT include the opening php tag
//* Enqueue Dashicons
add_action( 'wp_enqueue_scripts', 'b3m_enqueue_dashicons' );
function b3m_enqueue_dashicons() {
wp_enqueue_style( 'dashicons' );
}
You can’t perform that action at this time.