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

Using Custom Fields in post, need to put into the_content

I think that I would hijack the gallery shortcode. function my_gallery_shortcode($atts) { global $post; $str = gallery_shortcode($atts); $project_title = get_post_meta($post->ID, “Project_Title”, true); $project_date = get_post_meta($post->ID, “Project_Date”, true); $project_location = get_post_meta($post->ID, “Project_Location”, true); $str .= ‘<div class=”project_details”>’; $str .= ‘<div class=”project_details_title”>’.$project_title.'</div>’; $str .= ‘<div class=”project_details_date”>’.$project_date.'</div>’; $str .= ‘<div class=”project_details_location”>’.$project_location.'</div>’; $str .= ‘</div>’; return $str; } add_shortcode(‘gallery’,’my_gallery_shortcode’); … Read more

Grouped custom taxonomy query

If you need nested queries, first you should think about, which data is needed. In your example you need all terms of a tanonomy as well as all posts belonging to each taxonomy. So the first step should be to find a way to loop through all terms of a taxonomy: /* TAXONOMIES */ // … Read more

Assign classes to Custom fields

I think you have to output these Custom Fields manually to do it. You can do it like so (let’s assume your custom fields are: first-meta-key, second-meta-key, third-meta-key and you set them single value – no field has multiple values assigned to it): <ul> <li><span class=”first-post-meta-key”>Name: </span> <?php echo esc_html(get_post_meta($post->ID, ‘first-meta-key’, true)); ?></li> <li><span class=”second-post-meta-key”>Name: … Read more

featured images – custom links

Look at the specified link within the featured-image in the last part of your snippet. You’ll have to update the_permalink() with your custom link, too: <div class=”featured-image”> <a href=”https://wordpress.stackexchange.com/questions/106791/<?php echo esc_url( $more_link ); ?>”><?php print_thumbnail( $thumb, $thumbnail[“use_timthumb”], $title, $width, $height, ” ); ?></a> </div> <!– .featured-image –>

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