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
ANSIBLE_PATH = __dir__ # absolute path to Ansible directory on host machine | |
ANSIBLE_PATH_ON_VM = '/home/vagrant/trellis'.freeze # absolute path to Ansible directory on virtual machine | |
require File.join(ANSIBLE_PATH, 'lib', 'trellis', 'vagrant') | |
require File.join(ANSIBLE_PATH, 'lib', 'trellis', 'config') | |
require 'yaml' | |
vconfig = YAML.load_file("#{ANSIBLE_PATH}/vagrant.default.yml") | |
if File.exist?("#{ANSIBLE_PATH}/vagrant.local.yml") |
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
if ( ! function_exists( 'electro_template_loop_tags' ) ) { | |
/** | |
* Output Product Tags | |
* | |
*/ | |
function electro_template_loop_tags() { | |
global $product; | |
$product_id = electro_wc_get_product_id( $product ); | |
$tags = wc_get_product_tag_list( $product_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
function my_wc_hide_in_stock_message( $html, $product ) { | |
if ( $product->is_in_stock() ) { | |
return ''; | |
} | |
return $html; | |
} | |
add_filter( 'woocommerce_get_stock_html', 'my_wc_hide_in_stock_message', 10, 2 ); |
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 | |
/** sample of css and js to create a custom loading animation to cover the full facet area | |
** change #facet-container to a id or class of container element for your facets | |
** update css as needed | |
** please see https://facetwp.com/documentation/support/ for questions | |
**/ | |
add_action( 'wp_head', function() { ?> | |
<style> | |
#facet-container { |
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 | |
add_action( 'wp_footer', 'facetwp_date_range_in_single_calendar',100); | |
function facetwp_date_range_in_single_calendar() { | |
?> | |
<script> | |
(function($) { | |
if ( 'undefined' !== typeof FWP ) { | |
FWP.hooks.addFilter('facetwp/set_options/date_range', function(flatpickr_opts, extras) { |
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 | |
if ( ! function_exists( 'woocommerce_catalog_ordering' ) ) { | |
/** | |
* Output facet sort box instead of woocommerce's | |
*/ | |
function woocommerce_catalog_ordering() { | |
echo facetwp_display( 'sort' ); | |
} | |
} |
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 | |
/* | |
* This code uses the original function and | |
* adds a shortcode functionality to display the product loop with | |
* the products that are available adding also another shortcode for | |
* products that are unavailable | |
* | |
* Usage: [bookable_products start="2019-10-10" end="2019-10-15"] | |
* [unbookable_products start="2019-10-10" end="2019-10-15"] | |
* |
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 | |
/* | |
Template Name: Bookings Person types list | |
*/ | |
?> | |
<?php get_header(); ?> | |
<?php | |
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
/* globals FWP */ | |
/** | |
* JavaScript for FacetWP Infinite Scroll | |
*/ | |
( function( $ ) { | |
'use-strict'; | |
var throttleTimer = null; | |
var throttleDelay = 100; |
NewerOlder