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 | |
function register_ticket_coupon_shortcode( $shortcodes, EE_Shortcodes $lib ) { | |
if ( $lib instanceof EE_Ticket_Shortcodes ) { | |
$shortcodes['[COUPON_CODE]'] = _('This will output an S2member generated shortcode for non-member ticket purchasers.'); | |
} | |
return $shortcodes; | |
} | |
add_filter( 'FHEE__EE_Shortcodes__shortcodes', 'register_ticket_coupon_shortcode', 10, 2 ); |
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 | |
function register_vat_shortcode( $shortcodes, EE_Shortcodes $lib ) { | |
if ( $lib instanceof EE_Transaction_Shortcodes ) { | |
$shortcodes['[VAT_PAID]'] = _('This calculates 20% of the total price, to find out how much of what was paid is VAT.'); | |
} | |
return $shortcodes; | |
} | |
add_filter( 'FHEE__EE_Shortcodes__shortcodes', 'register_vat_shortcode', 10, 2 ); |
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
{ | |
"auto_complete": true, | |
"auto_indent": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Materialize/schemes/Material Solarized Dark.tmTheme", | |
"default_encoding": "UTF-8", | |
"detect_indentation": true, | |
"draw_indent_guides": true, | |
"draw_white_space": 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 if (facetwp_display( 'facet', 'adaptation_levels' ) || facetwp_display( 'facet', 'search' )): ?> | |
<div class="category-navigation"> | |
<div class="container vpadding--top vpadding--xs"> | |
<div class="row"> | |
<div class="col-xs-12"> | |
<?php echo facetwp_display( 'facet', 'adaptation_levels' ); ?> | |
<?php echo facetwp_display( 'facet', 'search' ); ?> | |
</div> |
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 | |
// Doesn't work | |
$args = array( | |
'post_type' => 'espresso_events', | |
'meta_query' => array( | |
array( | |
'key' => 'is_this_an_external_event', | |
'value' => '1', | |
'compare' => '!=' | |
), |
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 | |
function my_facetwp_is_main_query( $is_main_query, $query ) { | |
if ( isset( $query->query_vars['facetwp'] ) ) { | |
$is_main_query = true; | |
} | |
return $is_main_query; | |
} | |
add_filter( 'facetwp_is_main_query', 'my_facetwp_is_main_query', 10, 2 ); |
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 $args = array( | |
'post_type' => 'espresso_events', | |
'posts_per_page' => -1, | |
'facetwp' => true | |
); ?> | |
<?php $the_query = new WP_Query( $args ); ?> | |
<?php if ( $the_query->have_posts() ) { ?> | |
<div class="facetwp-template"> | |
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> |