You were right, there was pre tag in the HTML editor. i do not know how they appeared, but I removed them and everything displays perfectly. Thanks a lot my friend
… glad that’s sorted out.
Regarding my second answer, sorry if I were not clear enough (english is not my native langage)
Your second sentence is exaclty what I need : I want to extract specific fields from the user’s profile (which are added by WP Biographia) and display them in the author template in some way (on author.php) ! is it possible ?
… no need to apologise; your English is way way better than my French ??
So what you are asking for is easily done, but it requires a little bit of PHP code to use the WordPress API to do this.
Basically, all of the additional profile fields (Facebook, Twitter, etc) that the plugin adds to the user profile are stored as part of the user profile in the wp_usermeta
table in the database, not as part of the plugin itself. This means that you can use the standard WordPress API calls that act on the user profile to access them (it does also mean though that these fields will go away if the plugin is deactivated or uninstalled).
Firstly you’ll need to get the User ID you need.
If you want the ID of the currently logged in user, you can call get_currentuserinfo()
(https://codex.www.ads-software.com/get_currentuserinfo) and then use the global $user_ID
.
If you’re in the WordPress Loop and you want the user ID of the author who wrote the current post or page, you can use the global $post
and get the user ID via $post->post_author
.
If you know the login name of the user, you can call get_user_by()
(https://codex.www.ads-software.com/Function_Reference/get_user_by) passing the login name along the lines of get_user_by ('login', $login_name)
.
Once you have the user ID you want, you then just use the get_user_meta()
API call to return the profile item you want. The names of the items that the plugin adds are all lowercase and should be self explanatory, so Facebook is facebook
, Twitter is twitter
and so on.
So assuming you have your user ID in a variable called $user_ID
and you want the Facebook profile URL for this user, you’d do something like …
$facebook_url = get_user_meta ($user_id, 'facebook', true);
… there’s a lot to take in here, especially if you’re not familiar with the WordPress API; let me know how you get on and if you need any help.
-Gary