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
/* | |
<div class = "plus-to-minus"> | |
<span></span> | |
<span></span> | |
</div> | |
*/ | |
.question-container { | |
.plus-to-minus { | |
width: 50px; |
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
<section id="sectionFour"> | |
<?php $img = $four['full_size_image']; ?> | |
<div class="parallax" style = "background: url('<?php echo $img['url']; ?>');"></div> | |
</section><!-- #sectionFour --> | |
.parallax { | |
min-height: 500px; | |
background-attachment: fixed !important; | |
background-position: center !important; | |
background-repeat: no-repeat !important; |
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
//Add a new post meta column for post views | |
function wpb_set_post_views($postID) { | |
$count_key = 'wpb_post_views_count'; | |
$count = get_post_meta($postID, $count_key, true); | |
if($count==''){ | |
$count = 0; | |
delete_post_meta($postID, $count_key); | |
add_post_meta($postID, $count_key, '0'); | |
} else{ | |
$count++; |
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
add_filter( 'ninja_forms_render_default_value', 'nf_hidden_field_values', 10, 3 ); | |
// Populate event names for dropdown | |
add_filter( 'ninja_forms_render_options', function($options,$field_settings){ | |
if( $field_settings['key'] == 'event_names' ) { | |
$args = array( | |
'post_type' => 'event', | |
'posts_per_page' => -1, | |
'post_status' => 'publish' | |
); | |
$the_query = new WP_Query( $args ); |
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
<div class="pagination"> | |
<?php | |
echo paginate_links( array( | |
'base' => str_replace( 999999999, '%#%', esc_url( get_pagenum_link( 999999999 ) ) ), | |
'total' => $qry->max_num_pages, | |
'current' => max( 1, get_query_var( 'paged' ) ), | |
'format' => '?paged=%#%', | |
'show_all' => false, | |
'end_size' => 2, | |
'mid_size' => 1, |
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
//Custom excerpts for ACF fields | |
function wp_trim_excerpt_modified($text, $content_length = 55, $remove_breaks = false) { | |
if ( '' != $text ) { | |
$text = strip_shortcodes( $text ); | |
$text = excerpt_remove_blocks( $text ); | |
$text = apply_filters( 'the_content', $text ); | |
$text = str_replace(']]>', ']]>', $text); | |
$num_words = $content_length; | |
$original_text = $text; | |
$text = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $text ); |
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
{% for block in section.blocks %} | |
{% assign count = 1 %} | |
data-aos="{% if count == 1 or count == 3 %}fade-up-right{% else %}}fade-up-left{% endif %}" | |
{% assign count = count | plus: 1 %} | |
{% endfor %} |
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
$.fn.widest = function() { | |
return this.length ? this.width(Math.max.apply(Math, this.map(function() { | |
return $(this).width(); | |
}))) : this; | |
}; |
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
-webkit-filter: drop-shadow(5px 5px 5px rgba(0,0,0,.75)); | |
filter: drop-shadow(5px 5px 5px rgba(0,0,0,.75)); |
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
<script> | |
var getQuoteFields = Marionette.Object.extend( { | |
initialize: function() { | |
this.listenTo( Backbone.Radio.channel( 'forms' ), 'submit:response', this.actionSubmit ); | |
}, | |
actionSubmit: function( response ) { | |
$sqFootage = response.data['fields'][15]['value']; | |
//Remove the hypens and replace with spaces | |
$county = response.data['fields'][10]['value'].replace(/-/g, " "); | |
jQuery('#squareFootage').text($sqFootage); |