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
@rickrduncan
rickrduncan / header-nav.php
Last active Aug 29, 2015
Unregister header right widget and resposition genesis subnav
View header-nav.php
<?php
//* Do NOT include the opening php tag
//***************************************************************************************************
//** START: Unregister header right widget area. Reposition secondary navigation menu after header.
//* Unregister the header right widget area
unregister_sidebar( 'header-right' );
@rickrduncan
rickrduncan / htaccess.txt
Last active Aug 29, 2015
Limit Access to wp-admin by IP Address
View htaccess.txt
# BEGIN Allow/Deny Access to WP-LOGIN
<Files wp-login.php>
# set up rule order
order deny,allow
# default deny
deny from all
# Add additional IPs for access below:
# YOUR PLACE OF BUSINESS
allow from xxx.xxx.xxx.xxx
allow from xxx.xxx.xxx.xxx
@rickrduncan
rickrduncan / disable_rss_feed.php
Last active Nov 6, 2015
Small script to place in child theme functions.php file to disable RSS feed.
View disable_rss_feed.php
<?php
//* Do NOT include the opening php tag
//* BEGIN: Disable WordPress RSS Feed
function b3m_disable_rss_feed() {
wp_die( __( 'Our RSS feed is disabled. Please <a href="'. get_bloginfo('url') .'">visit our homepage</a>.' ) );
}
View remove_header_junk.php
<?php
//* Do NOT include the opening php tag
/**
* @purpose: Remove references to feed from <head> section of website
*
* @author: Rick R. Duncan
* @contact: www.rickrduncan.com
*
*/
function b3m_remove_header_junk() {
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-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-home-link.php
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-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-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' );
}
}
You can’t perform that action at this time.