From 0eb0ca1794a2772c3e4a0b23e2a0fe9b2580f04d Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 12 Jan 2017 16:55:13 -0500 Subject: [PATCH] adding ajax search shortcode to the forum template --- functions.php | 38 -------------------------------------- sections/interior-page.php | 6 +----- 2 files changed, 1 insertion(+), 43 deletions(-) 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 @@
- +
-- 2.17.1