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 combine-menu-responsive.js
jQuery(function( $ ){
$("header #menu-right-menu").addClass("responsive-menu").before('<div id="responsive-menu-icon"></div>');
$("header #menu-right-menu").slideToggle();
if(window.innerWidth > 768) {
rickrduncan / jetpack-share-after-post-title.php
Last active Aug 29, 2015
Reposition JetPack share buttons to below post title for users of the Genesis Framework.
View jetpack-share-after-post-title.php
//* Do NOT include the opening php tag
//* Add Jetpack share buttons above post
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
add_filter( 'the_content', 'b3m_share_buttons_above_post', 19 );
add_filter( 'the_excerpt', 'b3m_share_buttons_above_post', 19 );
rickrduncan / child-theme-url.php
Created Apr 16, 2014
A shortcode to output your child theme URL to be used in Posts, Pages and/or Widgets.
View child-theme-url.php
//* Do NOT include the opening php tag
//* Get path to our child theme folder
//* Useage: [theme-url]
function b3m_theme_uri_shortcode( $attrs = array (), $content = '' ) {
$theme_uri = is_child_theme() ? get_stylesheet_directory_uri() : get_template_directory_uri();
return $theme_uri;
rickrduncan / archive-order-by.php
Created Apr 25, 2014
Order WordPress archive posts by "Title" in "Ascending" order for one specific category.
View archive-order-by.php
//* Do NOT include the opening php tag
function b3m_before_loop () {
if( is_category( '1' ) ) {
global $query_string;
query_posts( wp_parse_args( $query_string, array( 'orderby' => 'title', 'order' => 'ASC' ) ) );
rickrduncan / delay_publish_rss_feed.php
Created May 28, 2014
Small script to place in child theme functions.php file to delay the publishing of a new RSS feed file.
View delay_publish_rss_feed.php
//* Do NOT include the opening php tag
//* Delay the adding of new content to the WordPress RSS feed
function b3m_delay_publish_rss_feed($where) {
global $wpdb;
if ( is_feed() ) {
rickrduncan / step_1.php
Last active Aug 29, 2015
2 Step process to remove RSS feeds from WordPress websites
View step_1.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="/">visit our homepage</a>.' ) );
View scramble-email-address.php
//* Do NOT include the opening php tag
//* Display email to screen WITHOUT href and scramble it to hide from spam bots
function b3m_hide_email_shortcode( $atts, $content = null ) {
if ( ! is_email( $content ) ) {
rickrduncan / 508-genesis-searchbox.php
Created Apr 30, 2015
508 Compliant Genesis Search Box
View 508-genesis-searchbox.php
//* Do NOT include the opening php tag
/** 508 Compliant Search Box
* @param string search form
* @param string search text
* @param string button text
* @return string modified search form
function b3m_search_form( $form, $search_text, $button_text ) {
rickrduncan / remove-emoji.php
Created May 17, 2015
Disable WordPress 4.2 Emoji support
View remove-emoji.php
//* Do NOT include the opening php tag
//* Remove silly-ass emoji code
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
rickrduncan / header-nav.php
Last active Aug 29, 2015
Unregister header right widget and resposition genesis subnav
View header-nav.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' );
You can’t perform that action at this time.