Created
June 20, 2017 19:11
-
-
Save bradfranklin/2ebb8bac3e7e3212d980c94908fb9e38 to your computer and use it in GitHub Desktop.
Troubleshooting code - facetwp RESULTS page issue
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 | |
/* | |
Template Name: Page - Test Results Support | |
*/ | |
?> | |
<?php | |
global $detect; | |
?> | |
<?php get_header(); ?> | |
<div class="flexbox-wrapper"><!-- START .flexbox-wrapper --> | |
<div class="row"><!-- START .row --> | |
<div class="small-12 medium-5 large-6 columns"><!-- START .columns --> | |
<div class="flexitem-1"><!-- .flexitem-1 START - Display Map --> | |
<div class="facetwp-template" style="padding: 10px; border: 4px solid red;"><!-- REQUIRED .facetwp-template--> | |
<?php echo facetwp_display( 'map' ); ?> | |
</div> | |
</div><!-- .flexitem-1 --> | |
<div class="flexitem-2"><!-- .flexitem-2 START - Display Facets --> | |
<div class="facetwp-template" style="padding: 10px; border: 4px solid yellow;"><!-- REQUIRED .facetwp-template--> | |
<?php echo facetwp_display( 'facet', 'test_search' ); ?> | |
<?php echo facetwp_display( 'facet', 'test_location' ); ?> | |
<?php echo facetwp_display( 'facet', 'test_categories' ); ?> | |
</div> | |
</div><!-- .flexitem-2 --> | |
</div> | |
<div class="small-12 medium-7 large-6 columns"><!-- START .columns --> | |
<div class="flexitem-3"><!-- .flexitem-3 START - Display Results --> | |
<div class="facetwp-template" data-name="test_results" style="padding: 10px; border: 4px solid lime;"><!-- REQUIRED .facetwp-template--> | |
<?php echo facetwp_display( 'template', 'test_results' ); ?> | |
</div> | |
<div class="facetwp-pager"> | |
<?php echo facetwp_display( 'pager' ); ?> | |
</div> | |
</div><!-- .flexitem-3 --> | |
</div><!-- END .columns --> | |
</div><!-- END .row --> | |
</div><!-- END .flexbox-wrapper --> | |
<script> | |
(function($) { | |
$(document).on('facetwp-loaded', function() { | |
$('html, body').animate({ scrollTop: 0 }, 500); | |
}); | |
})(jQuery); | |
</script> | |
<?php get_footer(); ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment