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 | |
//http://clicknathan.com/web-design/wordpress-custom-taxonomy-dropdown-without-a-submit-button/ | |
//This goes function.php | |
class my_Walker_CategoryDropdown extends Walker_CategoryDropdown { | |
function start_el(&$output, $category, $depth, $args) { | |
$pad = str_repeat(' ', $depth * 3); | |
$cat_name = apply_filters('list_cats', $category->name, $category); | |
$output .= "\t<option class=\"level-$depth\" value=\"".$category->slug."\""; |
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 | |
// Force full width content (optional) | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
// Enqueue javascript | |
wp_enqueue_script('isotope', get_stylesheet_directory_uri() . '/js/isotope.min.js', array('jquery'), '3.0.1', true); | |
wp_enqueue_script('isotope_init', get_stylesheet_directory_uri() . '/js/isotope-init.js', array('isotope'), '3.0.1', 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
jQuery(document).ready(function($){ | |
var $grid = $('.grid').isotope({ | |
itemSelector: '.grid-item', | |
percentPosition: true, | |
layoutMode: 'fitRows', | |
}); | |
// Layout Isotope after each image loads | |
$grid.imagesLoaded().progress( function() { |
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
# Block WordPress xmlrpc.php requests | |
<Files xmlrpc.php> | |
order deny,allow | |
deny from all | |
allow from 220.239.238.83 | |
allow from 192.0.64.0/18 | |
allow from 209.15.0.0/16 | |
allow from 66.155.0.0/17 | |
allow from 185.64.140.0/22 | |
</Files> |
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 me in | |
add_action( 'wp_enqueue_scripts', 'ls_scripts_styles', 20 ); | |
/** | |
* SwiperJS Scripts | |
*/ | |
function ls_scripts_styles() { | |
wp_enqueue_style( 'swipercssbundle', get_stylesheet_directory_uri() . '/css/swiper-bundle.min.css' , array(), '6.4.11', 'all' ); | |
wp_enqueue_script( 'swiperjsbundle', get_stylesheet_directory_uri() . '/js/swiper-bundle.min.js', array(), '6.4.11', true ); | |
wp_enqueue_script( 'swiperinit', get_stylesheet_directory_uri() . '/js/swiper-bundle-init.js', array( 'swiperjsbundle' ), '1.0.0', 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
<?php // <- dont add in the opening tag | |
//remove display notice - Showing all x results | |
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); | |
//remove default sorting drop-down from WooCommerce | |
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); |
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
.fl-icon-selector .fl-lightbox { | |
height: 100%; | |
width: 100%; | |
margin-top: 0 !important; | |
} |
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 //<~ dont add me into functions.php | |
add_action( 'woocommerce_product_query', 'prefix_custom_pre_get_posts_query' ); | |
/** | |
* Hide Product Cateories from targetted pages in WooCommerce | |
* @link https://gist.github.com/stuartduff/bd149e81d80291a16d4d3968e68eb9f8#file-wc-exclude-product-category-from-shop-page-php | |
* | |
*/ | |
function prefix_custom_pre_get_posts_query( $q ) { | |
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 | |
//My ACF Fields for reference | |
//testimonials - field group | |
//testimonial - sub-field | |
//testimonial_header - sub-field | |
//First Repeater Row in Array | |
$rows = get_field( 'testimonials', 348 );// grab all rows from page ID |