• Hi,

    I’m trying to find some kind of plugin that will add a custom field to each post,I would like to have a extra box in my post menu so I can put the link of where I found the information on the post.So under the authors name it will display “Source:+TheLink2TheSite.com”

Viewing 1 replies (of 1 total)
  • Disclaimer: I have only written half a plugin in my life.

    What you can do is use the Custom Fields section in the Write Post page to add “metadata” to a post. For example, in the Key field I would write Source, and in the Value field I would post the source URL or bibliography.

    You can then write a plugin that uses the get_post_meta() function to see if a particular post has Source metadata and use the the_content hook to display the source at the end of the post.

    I’m sorry for sounding intimidating, but I don’t know of any plugins that do that. Actually, the half-plugin that I’ve written is called “Match Scores” which does a similar thing (plugin unpublished at the moment). It adds a form to the Write Post form and prompts for football team names and scores for a match. It then hooks into the_content and format the scores nicely.

    If you like, I can send you a copy of what I’ve written in the plugin so far and maybe even customise it for your purposes. If you’re interested, drop by me at http://narnia.bounceme.net/jeremy/about/ and send me an email if you have a Wikipedia account, or an IM if you don’t.

Viewing 1 replies (of 1 total)
  • The topic ‘Add a custom field’ is closed to new replies.