Skip to content

Instantly share code, notes, and snippets.

@henihan
henihan / gist:d5987071bffc21346b66966157d13ada
Created June 16, 2021 10:16
Event Espresso - Conditionally hide/show question groups based on a radio button question value
function ee_custom_show_question_conditionally() {
wp_add_inline_script('ee_form_section_validation','jQuery( document ).ready(function($) {
var text = $("div[id^=\'ee-reg-form-qstn-grp-Silver-\']");
$(text).hide();
$(".ee-reg-qstn-88").change(function() {
//Uncomment Below to Test value of Question so you can put in the IF statement "Yes" in this example
//var test=$(this).val();
//Uncomment Below to Show the Value to the browser
//alert(test);
$(this).val() == "Yes" ? $(text).show() : $(text).hide();
@henihan
henihan / gist:5c8be0bd92de7b361a1b2e9a1ab15d0e
Created April 18, 2017 21:13
taxonomy-espresso-people_type-board-of-directors.php
<?php
get_header();
$post_type = 'espresso_people';
$taxonomy = 'espresso_people_type';
$terms = get_terms( array(
'taxonomy'=>$taxonomy,
'orderby'=>'name',
'order'=>'DESC',
));
// d($terms);