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

Permalink structure as code in back-end?

Your code works to create links, and WordPress should make a valiant effort to find the correct post, but it doesn’t get complete permalinks. To do that you will need to query the database for the post and construct a permalink if one is found. function transform_pseudo_anchor_wpse_101201($match) { global $wpdb; if (isset($match[1])) { $name = … Read more

Privacy in WordPress

You can combine these features by using the free versions of two plugins, Profile Builder that allows you to create a register form, the option of an admin approval and email confimation, login options; and Members that gives you control over which users (by role) have access to post content.

Show Custom Post From Logged In Author

I fixed the issue myself. What i was doing wrong was the query_posts line i had read query_posts( array( ‘post_author’ => $current_user->ID,’post_status’ => ‘publish’ , ‘post_type’ => array( ‘user_lists’ ) ) ); And the correct way should be query_posts( array( ‘author’ => $current_user->ID,’post_status’ => ‘publish’ , ‘post_type’ => array( ‘user_lists’ ) ) );

Display all existing members

You can use get_users(). $args = array( ‘fields’ => ‘all_with_meta’, ); $users = get_users( $args ); foreach( $users as $user ) { // your display code here var_dump( $user ); // so you can see what’s in $user } all_with_meta will get the user and all the associated meta, if I’m reading the Codex page … Read more

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