it’s a strange question 🙂
you can write a plugin with a function hooked up to the publish_post
action
function my_custom_field($post_id){
add_post_meta($post_id, 'my_key', 'my_value');
}
add_action('publish_post', 'my_custom_field');
To clarify more, when i am filling out the information to make a post, what i want to be able to do is have another text box where i can put a line of text and then post it to the database to then pull it from the database again.
kinda like a second title or a motto.
or in other words how does the title script actually post to the database?
i cant figure it out.
if you don’t want to use custom fields, you can use the excerpt field to attach an additional text to every post.
This article will help you to create the box interface you’re talking about.: http://codex.wordpress.org/Function_Reference/add_meta_box
The easiest thing to do would be to place a form inside the box and then process the information with the add_post_meta function.
http://codex.wordpress.org/Function_Reference/post_meta_Function_Examples
Hopefully that will get you started