Hide Custom Fields in New Post?
Posted
by Norbert
on Stack Overflow
See other posts from Stack Overflow
or by Norbert
Published on 2010-05-12T07:50:31Z
Indexed on
2010/05/12
14:54 UTC
Read the original article
Hit count: 972
I just started out with WordPress and I'm having some problems with the custom fields. Here's the code from functions.php
add_post_meta($post_id, 'Post Thumbnail', $post_thumb, true) or update_post_meta($post_id, 'Post Thumbnail', $post_thumb);
add_post_meta($post_id, 'Project URL', $url, true) or update_post_meta($post_id, 'Project URL', $url);
add_post_meta($post_id, 'Project Thumbnail', $thumb, true) or update_post_meta($post_id, 'Project Thumbnail', $thumb);
The problem is that they show up when I try to create a new post like so:
The other problem is that they don't even work, only if I publish the post, go back and readd each field. Is there any way to hide the fields to only show the "Add new custom field:" part? Thank you!
© Stack Overflow or respective owner