Search not displaying results
Search not displaying results
Search not displaying results
put value of keys and check results.(use get_users function to query users) $args=array( ‘relation’=>’AND’ ); if(isset($_GET[“nome_of_city”])){ $arg[]=array( ‘key’ => ‘your_key_name_1’, ‘value’ => $_GET[“nome_of_city”] ); } if(isset($_GET[‘name_of_neighborhood’])){ $arg[]=array( ‘key’ => ‘your_key_name_2’, ‘value’=>$_GET[‘name_of_neighborhood’], ‘compare’=>’IN’ ); } if(isset($_GET[‘name_of_course’])){ $arg[]=array( ‘key’ => ‘your_key_name_3’, ‘value’=> $_GET[‘name_of_course’], ‘compare’=>’IN’ ); } $users=get_users($args); foreach ($users as $user) { echo ‘<li>’ . $user->user_email . … Read more
Search Limited to Categories Not Working
is_search() is going to return TRUE on every search you perform, so that won’t do what you need if I understand correctly. You’ll have to use a post_type conditional tag. But it shouldn’t be too difficult with something like if (is_search()) { if (get_post_type() == ‘type_1’) { //Do the right styling } else if (get_post_type() … Read more
For this to work, you will need to have your search results ordered by the post type. function order_by_pt($where,$qry) { if (is_main_query() && $qry->is_search()) { global $wpdb; $where = $wpdb->posts.’.post_type DESC’; } return $where; } add_action(‘posts_orderby’,’order_by_pt’,1,2); Then a Loop like this one will do what you want, if I understand you. $type_title=””; while (have_posts()) { … Read more
I’ve never used is_page_template() but I have had good luck with is_page(‘new_search’) regardless of which conditional you use some things to check. Is the is_page_template(‘new-index.php’) working. you may test this by doing something like: if ( is_page_template(‘new-index.php’)) { wp_die(‘new search page’);} You should also use wp_register_style and wp_enqueue_style in your functions.php hooking in the the … Read more
You need to declare the variable as global in resources-search.php: <?php global $YearList; // Rest of file… May I ask why you’re hardcoding the years, instead of… $YearList = range( 2000, 2013 ); $YearList = range( 2000, date( ‘Y’ ) ); // From 2000 to current year
That is simple is Word Press, regardless of the theme you are using. Dashboard -> Settings -> Reading -> Blog pages show at most This would be better than editing your (child) theme. I am sorry that I went on too much in code editing and forgot the most basic and easy things. But if … Read more
It is hard to tell exactly what you’ve done, and it sounds a bit messy, but I think you’ve created “Pages” using the child templates as the “Template” under page attributes. That, or you are linking to them directly with wp-content/theme/themename/templatename.php. You never want to link directly like that, but if that were the case … Read more
Line 500 of your style.css reads: .page-template-template-white-rev-php .custom-search .menu-search-form{ background:#eef4f9; -moz-box-shadow:none; -webkit-box-shadow:none; box-shadow:none; } Just remove the background line here to fix it.