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
/** | |
* Optimize WooCommerce Scripts | |
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
*/ | |
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
function child_manage_woocommerce_styles() { | |
//remove generator meta tag | |
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
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
UPDATE wp_posts SET post_content = replace(replace(replace(post_content, '“', '"'), '”', '"'), '’', ''''); |
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 | |
add_action( 'tgmsp_callback_start', 'tgm_soliloquy_remove_image_attr' ); | |
function tgm_soliloquy_remove_image_attr( $id ) { | |
$script = 'var slides = $(slider).find(".soliloquy-slides > li img");'; | |
$script .= '$(slides).each(function(i){'; | |
$script .= '$(this).removeAttr("width height");'; | |
$script .= '});'; | |
echo $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 | |
//* Customize search form input box text | |
add_filter( 'genesis_search_text', 'sp_search_text' ); | |
function sp_search_text( $text ) { | |
return esc_attr( 'Search my blog...' ); | |
} |
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
.logo { | |
background: url(images/example.jpg); | |
} | |
@media (-webkit-min-device-pixel-ratio: 2), | |
(min-resolution: 192dpi) { | |
.logo { | |
background: url(images/[email protected]); | |
background-size: 100px 100px; | |
} |
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 | |
/** Load scripts on Portfolio page */ | |
add_action('genesis_after_footer', 'child_load_portfolio'); | |
function child_load_portfolio() { | |
if(is_page('Portfolio')) { | |
wp_register_script( 'isotope', get_bloginfo('stylesheet_directory').'/lib/js/jquery.isotope.min.js' ); | |
wp_enqueue_script ( 'isotope' ); | |
} |
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 | |
//* Customize the entry meta in the entry header (requires HTML5 theme support) | |
add_filter( 'genesis_post_info', 'post_info_filter' ); | |
function post_info_filter($post_info) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]'; | |
return $post_info; | |
} |
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 | |
function login_with_email_address($username) { | |
$user = get_user_by_email($username); | |
if(!empty($user->user_login)) | |
$username = $user->user_login; | |
return $username; | |
} | |
add_action('wp_authenticate','login_with_email_address'); |