Created
December 5, 2017 19:15
-
-
Save djrmom/4fd968e8aa20c636c1e876ed0740fa05 to your computer and use it in GitHub Desktop.
facetwp divi column js
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
<?php | |
/** | |
* updates et_pb_column_single for divi on facet load | |
*/ | |
add_action( 'wp_head', function() { ?> | |
<script> | |
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
if ( $( '.et_section_specialty' ).length ) { | |
$( '.et_section_specialty' ).each( function() { | |
var this_row = $( this ).find( '.et_pb_row' ); | |
this_row.find( '>.et_pb_column:not(.et_pb_specialty_column)' ).addClass( 'et_pb_column_single' ); | |
}); | |
} | |
}); | |
})(jQuery); | |
</script> | |
<?php }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment