Get users that likes the post

It appears that you are storing the data in the post’s meta, not user’s meta. Therefore, you need to retrieve it by directly getting the meta for that post, not by doing a user query. Let’s say your post’s ID is $post_id: First, retrieve the meta by get_post_meta(): $users = get_post_meta ( $post_id, ‘post_liked_users’, false … Read more

Why get_users() not working on the admin backend?

Perhaps user.php has not yet been loaded. get_users() is a wrapper for WP_User_Query, which is defined in wp-includes/user.php. Hooks indicate template_redirect is after wp, after users are registered. Perhaps you could try conditionally hooking ‘template_redirect’ on the front-end and ‘user_admin_menu’ on the back-end. if (is_admin()){ add_action(‘user_admin_menu’,’manage_new_user_submit’); } else { add_action(‘template_redirect’,’manage_new_user_submit’); } Also, you might remove … Read more

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