Created
June 20, 2017 19:08
-
-
Save bradfranklin/239198f97cd48fb1c571488b35a70df7 to your computer and use it in GitHub Desktop.
troubleshooting code - facetwp search 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 Search Support | |
*/ | |
?> | |
<?php get_header(); ?> | |
<script> | |
function s66_fwp_redirect_test() { | |
FWP.parse_facets(); | |
FWP.set_hash(); | |
var query_string = FWP.build_query_string(); | |
if ('' != query_string) { | |
query_string = '?' + query_string; | |
} | |
var url = query_string; | |
window.location.href = '<?php echo get_home_url(); ?>' + '/test-results-support/' + url; | |
} | |
document.getElementById('content').onkeydown = function(e){ | |
if(e.keyCode == 13){ | |
s66_fwp_redirect_test(); | |
} | |
}; | |
</script> | |
<div id="content"> | |
<div id="inner-content" class="row"> | |
<main id="main" class="large-12 medium-12 columns" role="main"> | |
<div class="flexbox-wrapper"> <!-- START .flexbox-wrapper --> | |
<div class="flexbox-container"> <!-- START .flexbox-container --> | |
<div class="flexitem-1"> | |
<h2 class="home-title">test-search-support</h2> | |
<h3 class="home-subtitle">"160619 - Redirects to - test-results-support"</h3> | |
</div> | |
</div> | |
<div class="flexbox-container"> <!-- START .flexbox-container --> | |
<div class="flexitem-2"> | |
<div class="facetwp-search"> | |
<div class="facetwp-template"> | |
<?php echo facetwp_display( 'facet', 'test_search' ); ?> | |
<span style="display:none"><?php echo facetwp_display( 'template', 'test_search' ); ?></span> | |
</div> | |
</div> | |
</div> | |
<div class="flexitem-3"> | |
<div class="facetwp-submit"> | |
<p><input type="submit" value="Search - Test Results Support" onclick="s66_fwp_redirect_test()"></p> | |
</div> | |
</div> | |
</div> <!-- END .flexbox-container --> | |
</div> <!-- END .flexbox-wrapper --> | |
</main> <!-- END #main --> | |
</div> <!-- END #inner-content --> | |
</div> <!-- END #content --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment