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
// Register Custom Taxonomy | |
function ess_custom_taxonomy_Item() { | |
$labels = array( | |
'name' => 'Brands', | |
'singular_name' => 'Brand', | |
'menu_name' => 'Brands', | |
'all_items' => 'All Brands', | |
'parent_item' => 'Parent Brand', | |
'parent_item_colon' => 'Parent Brand:', |
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 | |
// Display Fields | |
add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' ); | |
function woo_add_custom_general_fields() { | |
global $woocommerce, $post; | |
echo '<div class="options_group">'; | |
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
.soliloquy-container .soliloquy-slider:before { | |
display: block; | |
content: ''; | |
width: 50%; | |
height: 100%; | |
position: fixed; | |
right: 0; | |
z-index: 9; | |
background: url('http://www.360fashion.net/wp-content/uploads/2013/01/image-placeholder-500x500.jpg'); | |
background-size: contain; |
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 | |
// Adds a [social-icons] shortcode to output Genesis Simple Share icons in posts | |
// https://wordpress.org/plugins/genesis-simple-share/ | |
// Add the code below to your active theme's functions.php file, | |
// or use in a site-specific plugin. | |
// The shortcode takes no attributes; change your icon settings via Genesis → Simple Share. | |
add_shortcode( 'social-icons', 'gss_shortcode' ); |
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 this to functions.php */ | |
add_filter( 'woocommerce_shortcode_products_query', 'woocommerce_shortcode_products_orderby' ); | |
function woocommerce_shortcode_products_orderby( $args ) { | |
$standard_array = array('menu_order','title','date','rand','id'); | |
if( isset( $args['orderby'] ) && !in_array( $args['orderby'], $standard_array ) ) { | |
$args['meta_key'] = '_price'; | |
$args['orderby'] = 'meta_value_num'; |
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_action( 'wp', 'custom_hidden_comments' ); | |
function custom_hidden_comments() { | |
$restrictions = wc_memberships()->restrictions; | |
remove_filter( 'wp', array( $restrictions, 'hide_restricted_content_comments' ) ); | |
} | |
add_filter( 'wp', 'custom_hide_restricted_content_comments' ); | |
function custom_hide_restricted_content_comments( $content ) { | |
if ( is_singular() ) { |
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 | |
function get_isotope_item( $query_args = array() ){ | |
$defaults = array( | |
'post_type' => 'post', | |
'posts_per_page' => -1, | |
'post_status' => 'publish', | |
); | |
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
//* Register Horizontal Opt-In widget area | |
genesis_register_sidebar( | |
array( | |
'id' => 'horizontal-opt-in', | |
'name' => __( 'Horizontal Opt-In' ), | |
'description' => __( 'This is the widget area for horizontal opt-in form.' ), | |
) ); | |
//* Display Horizontal Opt-In below Header | |
add_action( 'genesis_after_header', 'sk_horizontal_opt_in' ); |
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 | |
function mbn_get_stores_by_location( $zip, $radius ) { | |
global $wpdb; | |
$radius = intval( $radius ); | |
// we first need to get the source coordinates | |
$sql = "SELECT `latitude`, `longitude` FROM `wp_zip_codes` WHERE `zipcode` = '%s'"; | |
$coords = $wpdb->get_row( $wpdb->prepare( $sql, $zip ) ); | |
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
/** | |
* Hide ACF menu item from the admin menu | |
*/ | |
function remove_acf_menu() | |
{ | |
// provide a list of usernames who can edit custom field definitions here | |
$admins = array( | |
'levy-access', |