facetwp generate press

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?php

add_action( ‘generate_before_main_content’, function() {
do_action( ‘facetwp_generate_archive_title’ );
echo facetwp_display( ‘facet’, ‘search’ );
echo ‘<div class=”facetwp-template”>’;
});

add_action( ‘generate_after_main_content’, function() {
echo ‘</div><– .facetwp-template –>’;
});

remove_action( ‘generate_archive_title’, ‘generate_archive_title’ );
add_action( ‘facetwp_generate_archive_title’, ‘generate_archive_title’ );
{{/gist}}