Custom search by several options send on form not works

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 page different results

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

Search page different title per results

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

Multiple search template with separate stylesheets

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

Search results in custom template

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

Customizing Home Page with Pagelines Platform

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

Permalink / sub-template issue

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)