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 | |
/** | |
* | |
* Custom Blog Loop for Bradonomics. | |
* | |
* Template Name: Bradonomics Blog | |
* | |
*/ | |
//* Remove standard post content output |
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
//* Enqueue scripts and styles | |
add_action( 'wp_enqueue_scripts', 'enqueue_custom_scripts_styles' ); | |
function enqueue_custom_scripts_styles() { | |
wp_enqueue_style( 'dashicons' ); | |
wp_enqueue_style( 'slick-styles', get_stylesheet_directory_uri() . '/css/slick.css' ); | |
wp_enqueue_style( 'slick-theme-styles', get_stylesheet_directory_uri() . '/css/slick-theme.css' ); | |
wp_enqueue_script( 'slick-js', get_stylesheet_directory_uri() . '/js/slick.min.js', array( 'jquery' ), '1.3.15', true ); |
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
// Change number or products per row to 3 | |
add_filter('loop_shop_columns', 'loop_columns'); | |
if (!function_exists('loop_columns')) { | |
function loop_columns() { | |
return 3; // 3 products per row | |
} | |
} |
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 the default header | |
remove_action( 'genesis_header', 'genesis_do_header' ); | |
//* Add Primary Nav in custom header | |
add_action( 'genesis_header', 'genesis_do_nav' ); | |
//* Add Site Title in custom header | |
add_action( 'genesis_header', 'sk_do_header' ); | |
function sk_do_header() { |
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 | |
/** | |
* Change the commission amount if products belong to certain categories | |
* | |
*/ | |
function affwp_custom_wc_commission_per_category( $referral_amount, $affiliate_id, $amount, $reference, $product_id ) { | |
// You can specify an array of categories to alter the commission for. Separate by a comma and use either the term name, term_id, or slug | |
$categories = array( 'category-one', 5 ); |
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. This goes inside your child theme functions.php file | |
/** ====================================================================================== | |
* | |
* Add shortcode to the Genesis 2.3.0 | |
* Archive Intro Text Output | |
* | |
======================================================================================= */ | |
add_filter( 'genesis_term_intro_text_output', 'do_shortcode' ); |
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 if(get_field('current_donations_total','options')) : | |
echo '£' . number_format((get_field('current_donations_total','options')), 0, '.', ','); | |
endif; ?> |
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
//* Display Posts Shortcode - Exclude Categories | |
add_filter( 'display_posts_shortcode_args', 'be_display_posts_shortcode_exclude_categories', 10, 2 ); | |
function be_display_posts_shortcode_exclude_categories( $args, $atts ) { | |
if( isset( $atts['cat_not_in'] ) ) { | |
$categories = explode( ',', $atts['cat_not_in'] ); | |
$args['category__not_in'] = $categories; | |
} |
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
add_action ( 'gsfc_post_content','add_subtitle', 10); | |
function add_subtitle(){ | |
if ( function_exists( 'the_subtitle' ) ) { | |
the_subtitle( '<p class="entry-subtitle">', '</p>' ); | |
} | |
} |
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
jQuery(document).ready(function($) { | |
$(".featured-single").backstretch([BackStretchImg.src],{duration:3000,fade:750}); | |
}); |
NewerOlder