From: Anthony Talarico Date: Thu, 12 Jan 2017 21:55:13 +0000 (-0500) Subject: adding ajax search shortcode to the forum template X-Git-Tag: v1.0.0^2~26 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=0eb0ca1794a2772c3e4a0b23e2a0fe9b2580f04d;p=WP-Themes%2Fmcda.git adding ajax search shortcode to the forum template --- diff --git a/functions.php b/functions.php index 2159eef..8e317d5 100644 --- a/functions.php +++ b/functions.php @@ -142,44 +142,6 @@ function is_post_type($type){ 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 .= "
-        Start: $start
-    
"; - $start += $limit; - $return_string .= "

Next

"; - return $return_string; -} - function searchfilter($query) { if(isset($_GET['searchType'])){ if ($query->is_search && !is_admin() ) { diff --git a/sections/interior-page.php b/sections/interior-page.php index 334643c..8d9ff71 100644 --- a/sections/interior-page.php +++ b/sections/interior-page.php @@ -36,11 +36,7 @@
- +