Hey there im fairly new to wordpress and php, but have a strong programming/database background.

I recently learned about custom fields and am wondering if it is at all possible to do the following with them in conjunction with database tables...

I want to be able to display a picture and name value for the person who posted the 'static' home page message. I would like to reference these values from a custom field bt have it linked to a pre-existing table of users. I say 'static' because its nt really a blog post and would be changed maybe once or twice a year.

Is this the correct approach to this idea or does wordpress offer a more elegant approach?

Thank you for your response/s in advance.

1 Answer 1


Custom field data saved in the wp_postmeta table. Best way to access custom field is using wordpress built-in functions.

for example:

 $mykey_values = get_post_custom_values('my_key');
 foreach ( $mykey_values as $key => $value ) {
     echo "$key  => $value ('my_key')<br />";

0 => First value ('my_key')

1 => Second value ('my_key')

2 => Third value ('my_key')

You will get more information about accessing custom field in this link: http://codex.wordpress.org/Custom_Fields

you also folllow further on

  • Interesting thanks for the reply. What about accessing the avatar image used by the user get_avatar() would that also work
    – user56683
    Jul 17, 2014 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.