show custom field content in jquery tabs

I think the answer is that there is no easy way to achieve what you’re looking for because nobody would want that behavior. Custom/meta fields get added to posts for all kinds of reasons, plugins do it all the time to store things you’d never want the public looking at both because it might be private and because it’s probably super-boring and/or incomprehensible.

Custom fields need to be added to your theme manually for a reason: only those you specifically choose make sense.

Remember, you only have to do all this while you’re setting up the site. Once the site is live you will probably not be adding custom fields to the theme very often (or at least you shouldn’t be).

That said there are ways you could lessen the burden for yourself by writing some PHP code that semi-automates the process. This would be especially useful if you were defining the fields inside PHP already, in which case you could mix together the metabox definitions (using something like http://wordpress.org/extend/plugins/custom-metadata/ ) and the list of fields you want to show up in tabs.

For example, you could make an array of $fields_to_show_in_tabs, with labels, postmeta-names and field_types for all the different tabs, then you could go through the array and register each custom field with Custom Metadata Manager. You could then reference the same array (probably good to put it in a Global variable: global $fields_to_show_in_tabs) in your theme, and do a foreach ($fields_to_show_in_tabs) where you loop through the array and display each one as a tab.

That’s what I would do if I had a seriously long list of fields that were likely to change a lot. Honestly though that’s likely to be overkill. If I were you I’d just update the theme while it’s in development and tell the client that they need your help to add any new tabs. That is totally reasonable and protects them from lots of potential nightmares that could happen from them creating strange new fields you never thought of.

ONE MORE THING: In your example you are showing the tab and tab content whether the postmeta exists or not. This means there might be an empty tab if the content wasn’t filled out. If you don’t want that behavior you should probably first check if the postmeta was set using something like:

<?php if (get_post_meta($post->ID, 'profile', true)): ?>
     <li><a href="#tabs-1">Profile</a></li>
<?php endif;?>

The same goes for the div tags. This is also a good argument in favor of creating a function that loops through an array of fields and displays them, that way you only need one copy of the HTML and PHP checking, and it can handle your various fields for you.