Last active
October 25, 2016 17:41
-
-
Save grantambrose/11fe201f412f5fe744d2bdcb2a0020d8 to your computer and use it in GitHub Desktop.
Hide page elements in Beaver Builder using URL parameters
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 our custom Body Classes based on the URL Parameters | |
add_filter('body_class', 'bb_body_class'); | |
function bb_body_class($classes) { | |
if( isset($_GET['plan']) ){ | |
$plan_param = $_GET['plan']; | |
if($plan_param == 'partner'){ | |
$classes[] .= 'pricing-partner'; | |
} | |
} | |
else{ | |
$classes[] .= 'pricing-standard'; | |
} | |
return $classes; | |
} |
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
/* ---------------------- | |
HANDLE THE PRICING TABLE CONDITIONAL DISPLAY | |
---------------------- */ | |
/* Hide the partner pricing table by default */ | |
.fl-row-pricing-partner{display:none;} | |
/* Hide the standard pricing when partner url variable set */ | |
body.pricing-partner .fl-row-pricing-standard{display:none;} | |
/* Show the partner pricing when partner url variable set */ | |
body.pricing-partner .fl-row-pricing-partner{display:block;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment