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 | |
//* DON'T ADD ABOVE | |
/* | |
* | |
* READ ME: | |
* I'm using Beaver Builder for page post types and I don't want that option on | |
* WooCommerce store, cart, checkout, and my account pages. I don't want the client to ask why she can't change |
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
function wc_ninja_remove_password_strength() { | |
if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) { | |
wp_dequeue_script( 'wc-password-strength-meter' ); | |
} | |
} | |
add_action( 'wp_print_scripts', 'wc_ninja_remove_password_strength', 100 ); |
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 | |
/* Removing custom title/logo metabox from Genesis theme options page. | |
* See http://www.billerickson.net/code/remove-metaboxes-from-genesis-theme-settings/ | |
* Updated to use $_genesis_admin_settings instead of legacy variable in Bill's example. | |
*/ | |
add_action( 'genesis_theme_settings_metaboxes', 'be_remove_metaboxes' ); | |
function be_remove_metaboxes( $_genesis_admin_settings ) { | |
remove_meta_box( 'genesis-theme-settings-header', $_genesis_admin_settings, 'main' ); |
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 | |
/** | |
* Template Name: Page Builder | |
* | |
* This page template only works with Genesis child themes and works great with the | |
* Beaver Builder plugin. Learn more: http://clickwp.com/blog/beaver-builder/ | |
*/ | |
// Force full width content layout to remove sidebar |
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 line! Just add what's below to the end of your functions.php file | |
add_action( 'edit_form_after_title', 'rgc_posts_page_edit_form' ); | |
function rgc_posts_page_edit_form( $post ) { | |
$posts_page = (int) get_option( 'page_for_posts' ); | |
if ( $posts_page === $post->ID ) { | |
add_post_type_support( 'page', 'editor' ); | |
} |
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: WooCommerce Subscriptions No $0 Emails | |
Plugin URI: | |
Description: Do not send processing or completed renewal order emails to customers when the order or renewal is for $0.00. | |
Author: | |
Author URI: | |
Version: 0.1 | |
*/ | |
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
(function(d) { | |
var tkTimeout=3000; | |
if(window.sessionStorage){if(sessionStorage.getItem('useTypekit')==='false'){tkTimeout=0;}} | |
var config = { | |
kitId: 'a1b2c3f4', | |
scriptTimeout: tkTimeout | |
}, | |
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";if(window.sessionStorage){sessionStorage.setItem("useTypekit","false")}},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='//use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s) | |
})(document); |
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
//* Remove first image from single post | |
function remove_first_image ($content) { | |
if (!is_page() && !is_feed() && !is_home()){ | |
$content = preg_replace("/<img[^>]+\>/i", "", $content, 1); | |
} return $content; | |
} | |
add_filter('the_content', 'remove_first_image'); |
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 //remove this line | |
function disable_self_ping( &$links ) { | |
foreach ( $links as $l => $link ) | |
if ( 0 === strpos( $link, get_option( 'home' ) ) ) | |
unset($links[$l]); | |
} | |
add_action( 'pre_ping', 'disable_self_ping' ); |
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 copy opening php tag | |
// Force Stupid IE to NOT use compatibility mode | |
add_filter( 'wp_headers', 'wsm_keep_ie_modern' ); | |
function wsm_keep_ie_modern( $headers ) { | |
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) ) { | |
$headers['X-UA-Compatible'] = 'IE=edge,chrome=1'; | |
} | |
return $headers; |
NewerOlder