add_action('thematic_searchloop', 'mytheme_search_loop');
// End of the Contextual/Highlight Search functions
-function import_forum() {
- $url = get_site_url() . '/import-forum';
- global $wpdb;
- $table = $wpdb->posts;
- $limit = 100;
- $return_string = '';
-
- if ( isset( $_REQUEST['start'] ) ) {
- $start = filter_var( $_REQUEST['start'], FILTER_VALIDATE_INT );
- } else {
- $start = 0;
- }
-
- $sql = "
- SELECT *
- FROM $table
- WHERE post_type = 'topic'";
- $sql .= " LIMIT $limit OFFSET $start";
- $results = $wpdb->get_results( $sql, ARRAY_A );
-
- $event_counter = 0;
-
- if ( !empty( $results ) ) {
- foreach ( $results as $post ) {
- $slug = sanitize_title($post['post_title']);
- $wpdb->update($wpdb->posts,array('post_name'=>$slug), array('ID'=>$post['ID']));
- }
- }
- $return_string .= "<pre>
- Start: $start
- </pre>";
- $start += $limit;
- $return_string .= "<p><a href=\""
- . $url
- . "?start=$start\">Next</a></p>";
- return $return_string;
-}
-
function searchfilter($query) {
if(isset($_GET['searchType'])){
if ($query->is_search && !is_admin() ) {
<div>
<?php get_template_part('parts/breadcrumbs'); ?>
<div id="interior-content" class="no-sidebar-content small-12 columns">
- <form role="search" method="get" class="searchform forum-search" action="<?php echo home_url('/'); ?>">
- <input class="search-input" type="text" placeholder="Search" value="" name="s">
- <input class="submit blogbutton" type="submit" name="submit" value="Search" />
- <input type="hidden" name="searchType" value="topic" />
- </form>
+ <?php echo do_shortcode('[wpdreams_ajaxsearchlite]'); ?>
<?php get_template_part('parts/main-content');?>
</div>
</div>