This file contains hidden or 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
/** | |
* Allow HTML in term (category, tag) descriptions | |
*/ | |
foreach ( array( 'pre_term_description' ) as $filter ) { | |
remove_filter( $filter, 'wp_filter_kses' ); | |
if ( ! current_user_can( 'unfiltered_html' ) ) { | |
add_filter( $filter, 'wp_filter_post_kses' ); | |
} | |
} | |
This file contains hidden or 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
/* Header Right Widget | |
------------------------------------------------*/ | |
.header-widget-area .widget { | |
margin-bottom: 0 !important; | |
display: inline-block; | |
margin: 0; | |
padding: 0; | |
} | |
.header-widget-area { | |
float: right; |
This file contains hidden or 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
/** | |
* Add social share buttons under the short description | |
*/ | |
function woo_social_share_under_desc() { | |
// Vars | |
$product_title = get_the_title(); | |
$product_url = get_permalink(); | |
$product_img = wp_get_attachment_url( get_post_thumbnail_id() ); ?> |
This file contains hidden or 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-1: Create Extra Widget Area | |
genesis_register_sidebar( array( | |
'id' => 'beforefooterarea', | |
'name' => __( 'Before_Footer_Area', 'child theme' ), | |
'description' => __( 'This is Before Footer Widget Headline...', 'child theme' ), | |
) ); | |
// Step-2: Position Widget Header - Place widget before Widget area |
This file contains hidden or 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
// Registers Widget Area Before Content | |
genesis_register_sidebar( array( | |
'id' => 'widget-before-content', | |
'name' => __( 'Widget Before Content', 'genesis' ), | |
'description' => __( 'Displays Content Before All Single Posts.', 'genesis' ), | |
) ); | |
//LOCATION | |
add_action( 'genesis_after_header', 'wv_widget_location_before_content' ); | |
function wv_widget_location_before_content () { | |
genesis_widget_area( 'widget-before-content', array( |
This file contains hidden or 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
/*Top Bar Utility Bar, left & right*/ | |
/** Register Utility Bar Widget Areas. */ | |
genesis_register_sidebar( array( | |
'id' => 'utility-bar-left', | |
'name' => __( 'Utility Bar Left', 'theme-prefix' ), | |
'description' => __( 'This is the left utility bar above the header.', 'theme-prefix' ), | |
) ); | |
genesis_register_sidebar( array( | |
'id' => 'utility-bar-right', | |
'name' => __( 'Utility Bar Right', 'theme-prefix' ), |
This file contains hidden or 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
add_filter( 'woocommerce_enable_order_notes_field', '__return_false' ); |
This file contains hidden or 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 | |
//For the ‘single’ product page, let’s add the following: | |
// Change 'add to cart' text on single product page | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'bryce_add_to_cart_text' ); | |
function bryce_add_to_cart_text() { | |
return __( 'Yes! I WANT this!', 'your-slug' ); | |
} | |
//But then what about on the ‘archive’ product pages? Add this: | |
// Change 'add to cart' text on archive product page | |
add_filter( 'woocommerce_product_add_to_cart_text', 'bryce_archive_add_to_cart_text' ); |
This file contains hidden or 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
add_filter( 'style_loader_src', function($href){ | |
if(strpos($href, "//fonts.googleapis.com/") === false) { | |
return $href; | |
} | |
return false; | |
}); |
This file contains hidden or 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
// kill genesis meta description when using another SEO plugin. also remove genesis SEO metas from posts. | |
remove_action( 'genesis_meta','genesis_seo_meta_description' ); | |
remove_action( 'admin_menu', 'genesis_add_inpost_seo_box' ); |
NewerOlder