WordPress.org

Ready to get started?Download WordPress

Forums

Extra field in wp-admin for the posts (10 posts)

  1. danirichter
    Member
    Posted 9 years ago #

    hi everybody.

    i would like to create a new field in the write-management of the wp-admin. it should of the name "source" or something like this and i want to have the content of that field in each post, if i click on "read more".

    is something like this possible with a hack or plugin? it would be nice, if someone could help me!

    greetz from germany.

  2. tomhanna
    Member
    Posted 9 years ago #

    Do you want it to be the same for every post? If so, just edit the part of the Main template that outputs the post.

    Do you want it to be different every time? Then edit the Main template to include the more tag, followed by the post meta data and create a custom field called "source". (You'll need to enable Advanced Controls in your Writing Options to be able to do custom fields, but otherwise that's very simple.)

    http://codex.wordpress.org/Using_Custom_Fields
    http://codex.wordpress.org/Template_Tags/the_meta

  3. danirichter
    Member
    Posted 9 years ago #

    hi tomhanna.

    the function of the custom field is not this what im searching for, i think.
    i want to have a field under the title field called "source" or something like this. the name is unimportant. in this field i write in every post something new. never the same. it should be a input field so that i can write something to every post in this box.

    the content of the new field should be shown in the article, when you click on "read more".

    is something like this possible?

  4. logista
    Member
    Posted 9 years ago #

    It's easy if you use the Get Custom Field Values plugin.

    When you write the post (using the Advanced Controls), you can assign whatever text you want to the custom field "source" (or whatever you decide to name it).

    Then, in the single.php template, you can call <?php echo c2c_get_custom('source'); ?> where you want it to appear in your full post.

  5. danirichter
    Member
    Posted 9 years ago #

    Hi logista.

    That is exactly what im searching for and it works fine! But my problem is the custom field function. I cant create a new field for all new posts.

    Is there a possibility to have a real field under the title field or something like that, which is there from the beginning. I want to have a field "source" all the time in the admin panel so that i only have to add the text in the field, like in the title field. do you understand me?

    is something like this possible? maybe with editing the php-files?

    best greetz from germany.

  6. amory
    Member
    Posted 9 years ago #

    Found this awhile back. It works with the latest version of WP, except for the fact that it shows up on EVERY page, not just the post pages. I'll let you know if I come across any work arounds.

  7. logista
    Member
    Posted 9 years ago #

    Once you create the custom field the first time, it (the key part of the key:value pair) will always be available from the drop-down list. To get this section next to the title field, you would have to edit the edit-form-advanced.php in the wp-admin folder to move the custom fields block. I suppose you could also add it to the edit-form.php if you didn't want to use all the advanced post features.

    As for having the key part already there and you just fill in the value part... well, it's not that hard to pull down the menu, and since I don't use the custom fields on every post I never bothered to see if I could edit the structure of the post to make them show up with some sort of default entries.

  8. amory
    Member
    Posted 9 years ago #

    http://www.bluewebpages.com/downloads/post_keywords.phps
    This will add a keywords field, stored in the postmeta row as are the existing custom fields. It's an older plugin of Ryan Boren's, modified to work with 1.5.x.

  9. amory
    Member
    Posted 8 years ago #

    FYI, there is an awesome plugin that does this:
    http://rhymedcode.net/projects/custom-field-gui

  10. ianchan
    Member
    Posted 8 years ago #

    This is an awesome plugin. How would I create a custom field that would allow for date selection (similar to the 'Edit Time') field?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags