This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
//* Remove the link 'SEO' from admin bar. It's placed there by the plugin WordPress SEO by Yoast. | |
add_action( 'wp_before_admin_bar_render', 'wlwp_admin_bar' ); | |
function wlwp_admin_bar(){ | |
global $wp_admin_bar; | |
$wp_admin_bar->remove_menu('wpseo-menu'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
//* ALL EXAMPLES ON THIS PAGE USE THE NEW HTML5 METHOD | |
//* Remove page titles site wide (posts & pages) (requires HTML5 theme support) | |
remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- STEP 2 --> | |
<!-- The code below is placed into a file named adsense-archive.php as noted in the Gist above. --> | |
<div id="archive-adsense-wrapper"> | |
<div class="ad-left"> | |
<script type="text/javascript"><!-- | |
google_ad_client = "ca-pub-xxxxxxxxxxxxx"; | |
google_ad_slot = "xxxxxxxxx"; | |
google_ad_width = 250; | |
google_ad_height = 250; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: oEmbed Gist | |
Plugin URI: http://firegoby.jp/wp/oembed-gist | |
Description: Embed source from gist.github. | |
Author: Takayuki Miyauchi | |
Version: 1.4.0 | |
Author URI: http://firegoby.jp/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WordPress Functionality Plugin | |
* Plugin URI: http://rickrduncan.com/wordpress/functionality-plugin | |
* Description: Core WordPress customizations that are theme independent. | |
* Author: Rick R. Duncan - B3Marketing, LLC | |
* Author URI: http://rickrduncan.com | |
* | |
* | |
* Version: 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var links = document.links; | |
for (var i = 0, linksLength = links.length; i < linksLength; i++) { | |
if (links[i].hostname != window.location.hostname && links[i].protocol != 'tel:' && links[i].protocol != 'mailto:' ) { | |
links[i].target = '_blank'; | |
links[i].rel = 'noopener noreferrer'; | |
} | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag above | |
/** | |
* | |
* Remove Contact Form 7 CSS stylesheet from all pages except where needed. | |
* | |
*/ | |
add_action('wp_print_styles', 'rrd_remove_cf7_css'); | |
function rrd_remove_cf7_css() { | |
if ( function_exists( 'wpcf7_enqueue_styles' ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag above | |
/** | |
* Sort Posts by "last modified date" | |
* | |
*/ | |
add_filter('posts_orderby', 'b3m_order_posts_by_mod_date', 999); | |
function b3m_order_posts_by_mod_date($orderby) { | |
if ( is_archive() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
//* Alter the Genesis Search for so that we can change the destination page and our querystring parameter. | |
add_filter( 'genesis_search_form', 'b3m_search_form', 10, 4); | |
function b3m_search_form( $form, $search_text, $button_text, $label ) { | |
$onfocus = " onfocus=\"if (this.value == '$search_text') {this.value = '';}\""; | |
$onblur = " onblur=\"if (this.value == '') {this.value = '$search_text';}\""; | |
$form = '<form role="search" method="get" class="searchform search-form" action="' . home_url() . '/search"> |
NewerOlder