0

I want to add a custom field on Add A New Post page.

Like - if I am to make a plugin which will post links to Twitter after a new post is made, I would like to give ability to user to select if he wants to tweet that particular post's link to Twitter. I want to display a check box somewhere in the page which says - "Post this on Twitter" and then check for it and make a tweet.

I have seen some plugins which do this. But can't remember which they were.

Can someone please help me out?

4 Answers 4

3

Look at the add_meta_box() function.

Sign up to request clarification or add additional context in comments.

Comments

1

You can use this very helpful plugin to add custom fields.

http://wordpress.org/extend/plugins/more-fields/

Comments

0

Maybe this plugin can help you? http://wordpress.org/extend/plugins/tweet-this/

1 Comment

thanks for the answer, but I wanted to do something. That was just for an example. I have found how to do that and I am gonna post code soon. :-)
-1

I have finally figured how to achieve this

You can use these hooks -

submitpost_box  } To display fields/form
submitpage_box }

edit_post  } To process the form
edit_page }

Hope that helps!

Source - Kontera ContentLink WordPress plugin.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.