horan
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
same situation here, and a simple solution provided: (in your current search.php)
<?php //get language $pLang = 'en_US'; if(stristr($_SERVER['REQUEST_URI'], '/zh_CN/')){ $pLang = 'zh_CN'; } elseif (stristr($_SERVER['REQUEST_URI'], '/zh_TW/')){ $pLang = 'zh_TW'; } //query plugin database global $wpdb; if($pLang != 'en_US'){ $postids = $wpdb->get_col( "SELECT post_ID FROM wp_mltlngg_translate WHERE post_content LIKE '%$s%' OR post_title LIKE '%$s%' AND language = '$pLang'", 0); if ( count($postids) > 0 ) { $searchkey = array( 'post_type' => array('post', 'page'), 'post__in' => $postids, 'posts_per_page' => -1 ); } else { $searchkey = 's='.$s.'&showposts=-1'; } } else { $searchkey = 's='.$s.'&showposts=-1'; } //search with arguments $allsearch = &new WP_Query($searchkey); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; // start the loop while ( $allsearch -> have_posts() ) : $allsearch -> the_post(); get_template_part( 'content', 'search' ); endwhile; ?>Forum: Plugins
In reply to: [Plugin: Google XML Sitemaps] Cannot access sitemap.xmltry to use ftp program to set(CHMOD) your sitemap.xml to 644, which will allow anonymous read.
Viewing 2 replies - 1 through 2 (of 2 total)