[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

How to have custom fields persistent

When I have created a few custom fields in Wordpress as per the instructions here http://codex.wordpress.org/Using_Custom_Fields. I need to enter information into these fields on every post. Is there a way to make these fields persistent as in visible (like regular fields like the title and description fields)?

Right now I have to add them over one by one in the Custom Fields box and that reloads the page.
0
omicronpersei8
Asked:
omicronpersei8
  • 4
  • 4
1 Solution
 
singletonCommented:
That page implies that adding the keys is permanent. Are yo not finding them permanent, or is it just that you dont know how to make it print out
0
 
omicronpersei8Author Commented:
The keys are permanent and show up in the drop down but they do not show up on new posts. I would like to keep them visible.

Steps to reproduce:

1. Goto write post (enter a title at least)
2. Goto custom fields box
3. add "Price" in the key box and in the value box add 10
4. click Add custom field

At this point it reloads the page and puts the post i was working on in the drafts field (at the top of the page). I think this is a bug.

5. Click "write post" again.

Notice that at the bottom of the screen the custom field is not shown. I would like the custom fields I make to show up permanently. Does that make sense?

PS I am using WP 2.0.5
0
 
singletonCommented:
The referenced page talks about get_post_custom_values($key), etc that you need to add to the appropriate php file. Do you understand what they are talking about? Which php file have you modified? (The exact name will depend on what theme you are using)
0
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 
omicronpersei8Author Commented:
I'm sorry, I meant, I want the custom fields to show up permanently on the "Write Post" page.

For example, on your wordpress site it would be this page,
http://www.wordpress_site.com/blog/wp-admin/post.php
0
 
singletonCommented:
In the folder wp-admin there is a file post.php

Have you modified that file to add the tags, per http://codex.wordpress.org/Using_Custom_Fields
0
 
omicronpersei8Author Commented:
I haven't modified anything.

On that page, look at the Usage section. There is this paragraph:

On your next post, you can add a new book and mood to your meta-data. In the Custom Fields section, the Key will now feature a pull down list with the previously entered Custom Fields. Choose "Currently Reading" and then enter the new book you are reading in the value. Click Add Custom Field and then repeat the process to add "Today's Mood".

Using the process above reloads the page each time. It does not show the custom fields by default. You have to select the field from the drop down, enter the value and then click Add Custom Field. This then reloads the page. So, if you have 20 custom fields then it becomes a nightmare. If you had 20 fields you would have to add, reload, add, reload, add, reload, etc. You've seen what happens when you do this yourself right? What I want, is for all the fields to show up as part of the form automatically. Does that make sense?

In other words, if when you create a new custom field there was a checkbox to "Always show this custom field when you are creating a new post".
0
 
singletonCommented:
The example is for the "Currently Reading" and "Today's Mood" to appear in a sidebar so that where they tell you to place the code.  But you want the keys to appear when you do a post, and that means modifying post.php in wp-admin, which is the code run for entering a post
0
 
omicronpersei8Author Commented:
Ah, ok. That is what I needed to know. THANK YOU!
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now