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 filter_events_by_taxonomies( $post_type, $which ) { | |
if ( 'event' !== $post_type ) | |
return; | |
$taxonomies = array( 'event_category', 'event_location' ); | |
foreach ( $taxonomies as $taxonomy_slug ) { | |
$taxonomy_obj = get_taxonomy( $taxonomy_slug ); | |
$taxonomy_name = $taxonomy_obj->labels->name; | |
$terms = get_terms( $taxonomy_slug ); | |
echo "<select name='{$taxonomy_slug}' id='{$taxonomy_slug}' class='postform'>"; |
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
/** | |
*** SIMPLE GRID | |
*** (C) ZACH COLE 2016 | |
*** https://github.com/zachacole/Simple-Grid/blob/master/simple-grid.css | |
*** modified by SolusiPress | |
**/ | |
/* ==== GRID SYSTEM ==== */ | |
.container { | |
width: 90%; |
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 | |
add_action( 'cmb2_admin_init', 'solusipress_event_detail_metaboxes' ); | |
add_action( 'cmb2_admin_init', 'solusipress_event_price_metaboxes' ); | |
function solusipress_event_detail_metaboxes() { | |
$prefix = '_spevt_'; | |
$cmb = new_cmb2_box( array( | |
'id' => 'spevt_event_metabox', |
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 | |
add_shortcode( 'solusipress_event_date_price', 'solusipress_event_date_price_cb' ); | |
add_shortcode( 'solusipress_event_sponsors', 'solusipress_event_sponsors_cb' ); | |
function solusipress_event_date_price_cb( $atts ) { | |
$prefix = '_spevt_'; | |
$meta_d1 = get_post_meta( get_the_ID(), $prefix.'start_date', true ); | |
$meta_d2 = get_post_meta( get_the_ID(), $prefix.'end_date', true ); | |
$price = get_post_meta( get_the_ID(), $prefix.'price', 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
.event-date-price { | |
border: 1px solid #f2f2f2; | |
margin-top: 10px; | |
margin-bottom: 25px; | |
} | |
.date-box, .price-box { | |
text-align: center; | |
} | |
.event.the-price span, | |
.the-date-date_start, |
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 | |
add_filter('woocommerce_is_purchasable', 'woocommerce_restaurant_purchasable', 10, 2 ); | |
function woocommerce_restaurant_purchasable($is_purchasable, $product) { | |
return (!$product->managing_stock() ? false : $is_purchasable); | |
} |
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 (!function_exists('woocommerce_template_loop_add_to_cart')) { | |
function woocommerce_template_loop_add_to_cart() { | |
global $product; | |
if ( ! $product->is_in_stock() || ! $product->is_purchasable() ) return; | |
woocommerce_get_template('loop/add-to-cart.php'); | |
} | |
} |
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 | |
add_shortcode( 'spr_services_box', 'spr_services_box_callback' ); | |
function spr_services_box_callback( $atts ) { | |
$html = ""; | |
ob_start(); | |
$txt1 = "Lorem ipsum dolor sit amet, error feugait consectetuer nec ex, te pro scripta adipisci."; | |
spr_service_box_content( 'gear', 'Theme Development', $txt1 ); |
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
<label> Your Address | |
[text your-address] </label> | |
<label>Provoince | |
[select province id:province_id "-- Select Province --"] | |
</label> | |
<label>Regency | |
[select regency id:regency_id "-- Select Regency --"] | |
</label> |
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 | |
/* | |
* @wordpress-plugin | |
* Plugin Name: CF7 Chained select | |
* Plugin URI: https://solusipress.com | |
* Description: Chained select box for administrative data on Contact Form 7 | |
*/ |