How to display the contents of a custom field by meta key
-
Example: I created a custom text field. I selected the “descri__o” metakey.
How to display the text without being in the content, but in a specific place, as in the articles on the posts page?Something like this example with “get_userdata()” function:
<?php $user_info = get_userdata(1);
echo ‘Username: ‘ . $user_info->user_login . “\n”;
echo ‘User roles: ‘ . implode(‘, ‘, $user_info->roles) . “\n”;
echo ‘User ID: ‘ . $user_info->ID . “\n”;
?>Please, help me. I am doing community work in my city and I need this.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to display the contents of a custom field by meta key’ is closed to new replies.