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
HTML ---- | |
<div class="container well checking" style="max-width:700px"> | |
<h3>We are now searching for your desired availability</h3> | |
<img src='images/loading.svg' alt='Loading availability' width='120' height='120'> | |
// loading.svg made at: http://loading.io/ |
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
header.php | |
<?php | |
if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) { | |
// echo $wp->query_vars['order-received']; | |
// Lets grab the order | |
$order = wc_get_order( $wp->query_vars['order-received'] ); |
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
// http://www.wpbeginner.com/wp-tutorials/how-to-use-shortcodes-in-your-wordpress-sidebar-widgets/ | |
add_filter('widget_text','do_shortcode'); | |
add_shortcode('shortcode_find_restaurant', 'shortcode_find_restaurant'); | |
function shortcode_find_restaurant() { | |
$terms = get_terms( array( | |
'taxonomy' => 'towns-restaurant', | |
'hide_empty' => false, |
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('shortcode_find_takeaway', 'shortcode_find_takeaway'); | |
function shortcode_find_takeaway() { | |
$terms = get_terms( array( | |
'taxonomy' => 'towns-takeaway', | |
'hide_empty' => false, | |
) ); | |
if ( $terms && ! is_wp_error( $terms ) ) : | |
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('shortcode_find_accommodation', 'shortcode_find_accommodation'); | |
function shortcode_find_accommodation() { | |
$terms = get_terms( array( | |
'taxonomy' => 'towns-accommodation', | |
'hide_empty' => false, | |
) ); | |
if ( $terms && ! is_wp_error( $terms ) ) : | |
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
// http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-wordpress-widget/ | |
// | |
// Select a Restaurant | |
class eoc_widget_select_restaurant extends WP_Widget { | |
function __construct() { | |
parent::__construct( | |
// Base ID of your widget | |
'eoc_widget_select_restaurant', |
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 get_pop_up($ID) { | |
$rows_fss = get_field('slideshow_repeater',$ID); | |
$output = ""; | |
if($rows_fss) { | |
$output .= "<div id='inline1' style='display: none;'>"; |
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 | |
$local_folder = get_field('video_folder'); | |
$path = "/var/sites/k/XXX.co.uk/public_html/Videos/top-video-folder/".$local_folder; | |
$files = scandir($path); | |
foreach ($files as &$value) { | |
if ($value != "." && $value != "..") { |
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 gist requires: http://candlestudio.net/woocommerce/plugins/button-variations/ | |
// a fork of: https://gist.github.com/croosen/24a2845f91ce91a2819b | |
// WooCommerce - Display custom attributes on shop page - the official way ;-) | |
global $wc_ea_term_meta; | |
// Get the attributes |