User description only displayed for logged user

I have tested your code on my side, and it works perfectly. The relevant info displays, whether I’m logged in or not. This is definitely not a problem with your code, but more an external problem. You will need to look for any type of code that might restrict this code from showing if a … Read more

How to Create a User Profile Page?

Based on your comments, you should choose option 2 (using special template files). You can do that multiple ways, but I suggest you do the following: Create a plugin that will setup login, register, retrieve password, profile, delete account, and other related pages; (there will be a lot of pages). Creating a plugin is just … Read more

How to get last user with wpdb?

If you’re trying to get the last user created with the username format usuario*, I’d recommend using get_users() instead of writing a SQL query. $args = array( “search” => “usuario*”, // Search string “search_columns” => array( “user_login” ), // Field(s) to search “order” => “DESC”, // Search order “orderby” => “user_registered”, // Order by this … Read more

How to implement friend system for WordPress?

BuddyPress can be used as a framework – it allows you to friend other users, and is a good place to start from. [Update] This is the structure of the BuddyPress friends table (bp_friends) CREATE TABLE `wp_bp_friends` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `initiator_user_id` bigint(20) NOT NULL, `friend_user_id` bigint(20) NOT NULL, `is_confirmed` tinyint(1) DEFAULT ‘0’, … Read more

Getting the age of a users account

The answer from @Ralf912 (the second ‘here’ in my comment!) is all you need/want. This little function should help you out: (please make a backup of functions.php before adding this code snippet in that file. /** * Display Members registration year * * @author @Ralf912 * @return date(year) * @uses echo do_shortcode( ‘[memberSince]’ ); * … Read more

Calling User Nickname

Try echo the_author_meta( ‘nickname’, $current_user->ID ); or you can also use; $current_user = wp_get_current_user(); echo $current_user->nickname;

WordPress SQL Issue not returning correct reselts

Here is my answer in code form: <?php // Customer Details $args = array( ‘blog_id’ => $GLOBALS[‘blog_id’], ‘role’ => ‘customer’, ‘meta_key’ => ‘last_name’, ‘meta_value’ => ”, ‘meta_compare’ => ”, ‘meta_query’ => array(), ‘date_query’ => array(), ‘include’ => array(), ‘exclude’ => array(), ‘orderby’ => ‘last_name’, ‘order’ => ‘ASC’, ‘offset’ => ”, ‘search’ => ”, ‘number’ => … Read more

Replace Gravatar with UserPhoto in All Users Coulmn view

Not tested, but much probably this works: Instead of trying to add/change the columns, change the get_avatar behavior. For one, it is a pluggable function, so it can be overridden. And second, there are many Questions in this Stack on how to modify/customize the avatars. Check this two: Upload gravatar in WP profile? Removing Gravatar.com … Read more

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