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
$.localScroll({ | |
duration: 900 | |
}); |
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_shortcode('wc_num_items', 'function_wc_num_items'); | |
function function_wc_num_items($atts) { | |
global $woocommerce; | |
$cart_contents_count = $woocommerce->cart->cart_contents_count; | |
return $cart_contents_count; | |
} |
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
//* Enable line breaks in widget titles | |
add_filter( 'widget_title', 'html_widget_title' ); | |
function html_widget_title( $title ) { | |
$title = str_replace( '[', '<', $title ); | |
$title = str_replace( 'br]', 'br>', $title ); | |
return $title; | |
} |
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
.jetpack_subscription_widget .widget-wrap { | |
background: url("images/enews.png") no-repeat 260px 15px; | |
} | |
#subscribe-email #subscribe-field { | |
width: 175px; | |
padding: 5px; | |
font-size: 13px; | |
margin: 10px -2px 0 0; | |
} |
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 | |
//* Start the engine | |
include_once( get_template_directory() . '/lib/init.php' ); | |
//* Set Localization (do not remove) | |
load_child_theme_textdomain( 'minimum', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'minimum' ) ); | |
//* Child theme (do not remove) | |
define( 'CHILD_THEME_NAME', __( 'Minimum Pro Theme', 'minimum' ) ); | |
define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/minimum/' ); |
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
//* Customize the post meta function to show Tags on Category pages, Categories on Tag archives and both Tags and Categories on single Posts and views other than static Pages | |
add_filter( 'genesis_post_meta', 'sk_post_meta_filter' ); | |
function sk_post_meta_filter($post_meta) { | |
if ( is_category() ) { | |
$post_meta = '[post_tags]'; | |
} | |
elseif ( is_tag() ) { | |
$post_meta = '[post_categories]'; |
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
// Switch sidebars | |
add_action( 'get_header', 'change_genesis_sidebar' ); | |
function change_genesis_sidebar() { | |
if ( dynamik_has_label('leads') || dynamik_has_label('prospects') || dynamik_has_label('customers') ) { | |
remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); | |
add_action( 'genesis_sidebar', 'sk_do_sidebar' ); | |
} | |
} |
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
// Enqueuing and Using Custom Javascript/jQuery | |
function custom_load_custom_scripts() { | |
if ( file_exists( get_stylesheet_directory() . '/js/custom_jquery_additions.js' ) ) | |
$url = get_stylesheet_directory_uri() . '/js/custom_jquery_additions.js'; | |
else if ( file_exists( get_template_directory() . '/js/custom_jquery_additions.js' ) ) | |
$url = get_template_directory_uri() . '/js/custom_jquery_additions.js'; | |
if ( ! empty( $url ) ) | |
wp_enqueue_script( 'custom_jquery_additions', $url, array('jquery'), false, true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_load_custom_scripts' ); |
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
// Wrap Utility Bar and Header in a custom div | |
add_action( 'genesis_before_header', 'sk_opening_div', 9 ); | |
function sk_opening_div() { | |
echo '<div class="my-site-header">'; | |
} | |
add_action( 'genesis_after_header', 'sk_closing_div', 9 ); | |
function sk_closing_div() { |
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 before-entry widget area | |
genesis_register_sidebar( array( | |
'id' => 'before-entry', | |
'name' => __( 'Before Entry', 'your-theme-slug' ), | |
'description' => __( 'This is the before entry section.', 'your-theme-slug' ), | |
) ); | |
//* Hooks before-entry widget area to single posts | |
add_action( 'genesis_entry_content', 'sk_after_entry_widget', 9 ); | |
function sk_after_entry_widget() { |