Posted On: Feb 22, 2018
The user metafunction is used to retrieve the metadata of users. It can return a single value or an array of metadata.
Syntax is: get_user_meta( int $user_id, string $key = '', bool $single = false )
User id is the required user id parameter
Key is the optional parameter which is the meta key to retrieve. By default, it returns data for all key values.
Single is an optional parameter that tells whether the single value will return. By default, it is false.
Never Miss an Articles from us.
WordPress is a free, open-source CMS written in PHP and licensed under GPL. It enables users to create dynamic websites, from personal blogs to e-commerce sites. The stable version as of October 2020 ..
The first version of WordPress was released in 2003. It has since evolved into a leading open-source CMS, allowing users to create a wide range of websites with ease...
WordPress demands PHP 7+, MySQL 5.6+/MariaDB 10.0+, mod_rewrite Apache module, and HTTPS support (recommended) for peak performance and security...