I need a link that directs the user that is logged to his profile

You said that KingComposer will accept PHP blocks. This will generate a link to the current logged-in user’s author page: <?php $author_page = is_user_logged_in() ? get_author_posts_url( get_current_user_id() ) : NULL; $acc_pay_page = $author_page ? add_query_arg( ‘screen’, ‘acc_pay’, $author_page ) : NULL; if ( $acc_pay_page) { echo ‘<a href=”‘ . esc_url( $acc_pay_page ) .'”><img src=”account_page_page.png” /></a>’; … Read more

How to make WordPress ‘editor’ role to list/view/add/edit users only with the role ‘author’?

In addition to the code piece in the question, 1. To display only the author roles in the user list page of editor: add_action(‘pre_user_query’,’editors_edit_author_list’); function editors_edit_author_list($user_search) { $user = wp_get_current_user(); if($user->ID != 1) { $user_meta=get_userdata($user->ID); //$user_roles= $user_meta->roles; global $wpdb; if(in_array(‘editor’, $user_meta->roles)) { $user_search->query_where = str_replace( ‘WHERE 1=1’, “WHERE 1=1 AND {$wpdb->users}.ID IN ( SELECT {$wpdb->usermeta}.user_id … Read more

SQL to set Display Name to First Name + Last Name

Figured out the SQL query that can be used to reset the display_name to first_name + last_name. And it’s simpler than the JOINs that I was trying when I posted the question. UPDATE wp_users SET display_name = Concat( (SELECT meta_value FROM wp_usermeta WHERE meta_key = ‘first_name’ AND user_id = id ), ‘ ‘, (SELECT meta_value … Read more

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