Revisited: Creating Custom Write Panels in WordPress
Almost a year ago (wow, time flies!) I wrote a little tutorial explaining the nuances of add_meta_box in WordPress, and how it can be used to create some nifty Custom Write Panels. It was a nice little script, and still functioned great. I use it on almost all of the projects Liam and I have, and up to this point, it has been great. However, for an upcoming project, I foresaw some problems.
The current way things are set up in the script, it created a new row in the postmeta table for each custom input you included. Because of this, when you wanted to display the results on your theme, you also needed a separate variable for each input. Again, this great, and I never had any problems with it. But what happens when you have more than just one or two inputs? What about 8-10? Then things start getting a little hairy. Not only do you have to create 8-10 separate variables, but it creates a bunch of unneeded entries in the database.
So I decided to revise my script. Although it is only about 15 lines shorter than the previous one, it should function quite a bit faster (although I’ve done no real time trials.) The basic idea of the changes is to use a single row to include all the input fields, instead of one for each. If we store all of the data in a serialized array, we can have one key that holds all of our data. Because there is only one row to retrieve, we only have to define one variable to display our data.
A quick Example
This graphic is just a quick example to those of you who are new to custom write panels to help you see how this technique can be used to improve your experience in WordPress. Click to enlarge.
Things start of basically the same. I’ve slightly altered my meta box arrays (taking out info that never really gets used.) I’ve also added a new variable, $key which will be used to label our new data (among other things.)
Where We Left Off (in functions.php)
Note: Please excuse the code indentions. The WordPress plugin auto-formats it. Sorry!
<?php /* Plugin Name: Custom Write Panel Plugin URI: http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress Description: Allows custom fields to be added to the WordPress Post Page Version: 1.1 Author: Spencer Author URI: http://wefunction.com /* ----------------------------------------------*/ $key = "key"; $meta_boxes = array( "image" => array( "name" => "image", "title" => "Image", "description" => "Using the \"<em>Add an Image</em>\" button, upload an image and paste the URL here. Images will be resized. This is the Article's main image and will automatically be sized."), "tinyurl" => array( "name" => "tinyurl", "title" => "Tiny URL", "description" => "Add a small URL of this post that will be used to track tweets, and share the post.") );
Then, to get it out of the way, lets add our function that actually creates the panels:
function create_meta_box() {
global $key;
if( function_exists( 'add_meta_box' ) ) {
add_meta_box( 'new-meta-boxes', ucfirst( $key ) . ' Custom Post Options', 'display_meta_box', 'post', 'normal', 'high' );
}
}
Same exact thing as before, just used our $key variable to label the title.
Displaying the Write Panels
The next part is pretty similar as well. This is what we use to build the meta boxes. Like I said, not much changes. I’ve just removed some extra code that wasn’t needed (checking for standard values, which was removed from the arrays) and I also changed the way I setup the nonce.
<?php
function display_meta_box() {
global $post, $meta_boxes, $key;
?>
<div class="form-wrap">
<?php
wp_nonce_field( plugin_basename( __FILE__ ), $key . '_wpnonce', false, true );
foreach($meta_boxes as $meta_box) {
$data = get_post_meta($post->ID, $key, true);
?>
<div class="form-field form-required">
<label for="<?php echo $meta_box[ 'name' ]; ?>"><?php echo $meta_box[ 'title' ]; ?></label>
<input type="text" name="<?php echo $meta_box[ 'name' ]; ?>" value="<?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?>" />
<p><?php echo $meta_box[ 'description' ]; ?></p>
</div>
<?php } ?>
</div>
<?php
}
?>
Now I’m using WordPress’s wp_nonce_field to create a nonce. This time it is outside of the foreach loop, because we clearly only need one! (Not sure what I was thinking before.)
As I mentioned before, I took out some code to check for default values, and instead replaced it with a $data value. This looks for our single meta row, with our defined key, and fills the input with any necessary data.
Saving the Data
The final part, where we save the data, is what got changed the most. The basic idea is to loop through our original $meta_boxes array, creating a new array to hold the values. In English: for each array in $meta_boxes, get the value of the input field, and add it to a new $data array.
So now we have a single array. Check out the code below:
foreach( $meta_boxes as $meta_box ) {
$data[ $meta_box[ 'name' ] ] = $_POST[ $meta_box[ 'name' ] ];
}
Not too bad right? In the function, we also need to verify the data. Since I have a better understanding of how the nonce works now, I’ll try and explain how we verify it. We can use WordPress function, wp_verify_nonce to verify that the correct nonce was used in the time limit. If that’s not true, we return the $post_id to abort the script. This stops you from being tricked into doing something you don’t want to. You can read more about nonces from Mark Jaquith.
The next snipet checks to make sure that the current user has the authority to edit a post. Because we have only created the meta_boxes on the post page, we only need to check that they can edit posts.
if ( !wp_verify_nonce( $_POST[ $key . '_wpnonce' ], plugin_basename(__FILE__) ) ) return $post_id; if ( !current_user_can( 'edit_post', $post_id )) return $post_id;
If you remember the old script, in order to save the data, we first had to check to see if it existed, update it if it did, add it if it didn’t, or delete it if it was blank. Phew! A lot of checking. Imagine having the database do that 10 times? Seems quite slow right?
Well shortly after I wrote the old tutorial, WordPress updated update_post_meta so that if the row does not yet exist, it will create if for you. That allows us to only use one function, instead of checking for three. (I decided to exclude the delete, because chances are you’ll always have something, and one row isn’t nearly as bad as 3 or 4.)
So our final save function looks like this:
function save_meta_box( $post_id ) {
global $post, $meta_boxes, $key;
foreach( $meta_boxes as $meta_box ) {
$data[ $meta_box[ 'name' ] ] = $_POST[ $meta_box[ 'name' ] ];
}
if ( !wp_verify_nonce( $_POST[ $key . '_wpnonce' ], plugin_basename(__FILE__) ) )
return $post_id;
if ( !current_user_can( 'edit_post', $post_id ))
return $post_id;
update_post_meta( $post_id, $key, $data );
}
Final Code
Here is all of the new code. The last few lines initiate the script.
<?php
$key = "key";
$meta_boxes = array(
"image" => array(
"name" => "image",
"title" => "Image",
"description" => "Using the \"<em>Add an Image</em>\" button, upload an image and paste the URL here. Images will be resized. This is the Article's main image and will automatically be sized."),
"tinyurl" => array(
"name" => "tinyurl",
"title" => "Tiny URL",
"description" => "Add a small URL of this post that will be used to track tweets, and share the post.")
);
function create_meta_box() {
global $key;
if( function_exists( 'add_meta_box' ) ) {
add_meta_box( 'new-meta-boxes', ucfirst( $key ) . ' Custom Post Options', 'display_meta_box', 'post', 'normal', 'high' );
}
}
function display_meta_box() {
global $post, $meta_boxes, $key;
?>
<div class="form-wrap">
<?php
wp_nonce_field( plugin_basename( __FILE__ ), $key . '_wpnonce', false, true );
foreach($meta_boxes as $meta_box) {
$data = get_post_meta($post->ID, $key, true);
?>
<div class="form-field form-required">
<label for="<?php echo $meta_box[ 'name' ]; ?>"><?php echo $meta_box[ 'title' ]; ?></label>
<input type="text" name="<?php echo $meta_box[ 'name' ]; ?>" value="<?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?>" />
<p><?php echo $meta_box[ 'description' ]; ?></p>
</div>
<?php } ?>
</div>
<?php
}
function save_meta_box( $post_id ) {
global $post, $meta_boxes, $key;
foreach( $meta_boxes as $meta_box ) {
$data[ $meta_box[ 'name' ] ] = $_POST[ $meta_box[ 'name' ] ];
}
if ( !wp_verify_nonce( $_POST[ $key . '_wpnonce' ], plugin_basename(__FILE__) ) )
return $post_id;
if ( !current_user_can( 'edit_post', $post_id ))
return $post_id;
update_post_meta( $post_id, $key, $data );
}
add_action( 'admin_menu', 'create_meta_box' );
add_action( 'save_post', 'save_meta_box' );
?>
Implementation
One of the main reasons I redid the script was to have better implementation. Because all of our data is stored in one single row, we only need to call it once.
$data = get_post_meta( $post->ID, 'key', true );
Put that inside the while in the WordPress loop. Remember to change “key” to whatever value you entered in the script. That variable is now holding the array of information stored in the database. So you can simply access it like so:
<?php echo $data[ 'tinyurl' ]; ?>
Or
<?php echo $data[ 'image' ]; ?>
Like I said, not much changed on the back-end, it’s only a few lines shorter, but it should be quite a bit more efficient, as well as more expandable.
If you have any questions about the code above, or the tutorial in general, please do not hesitate to leave a comment below. I will do my best to help answer any questions that may arise.
Written by Spencer on October 15, 2009







AWESOME! I am going to be using this in my next project. For some reason, I couldn’t remember where I saw the original article at. This popped up in my google reader right at the right time.
Code looks solid. Thanks for revisiting it!
Awesome stuff, there’s so little information about this on the Internet, so thank you for publishing!
Very nice, I’ve been using a slight variation found inside the Hybrid theme for this. Good to see other perspectives.
this is gr8 piece of info
like this WP customization so much
it makes life a lot simple
ther was never a plugin to make custom write panels …
big round of applause for u
and my feed reader gets a new feed
delete this later .. lol
Very useful. If you’d like a comprehensive plugin that does a lot of this for you, check out Flutter (http://flutter.freshout.us/)
I really like the way it appears in the backend, however I feel Flutter is just a little bit easier to understand and use. It combines all of these features and adds a tad bit more. Good post though!
Thanks for this! Does the data in these custom write panels show up when using the basic WordPress search? That is one of the problems with Custom Fields.
Flutter does look pretty cool! But the script above is great for clients who you don’t want to have to create their own fields, or don’t know how. This lets you control which fields are on the posts, and what keys to use, when you develop the theme.
Hey, did you tried Flutter or MagicFields (flutter predecesor)?
Flutter is good — but seems to not be maintained any more. I’m helping out with, and really digging, Magic Fields. A fork of flutter, but already better.
http://magicfields.org/
Highly recommend it.
@Moodyjive,
The data inputted into these fields act no differently than normal custom fields, so no. However I did find this plugin: http://wordpress.org/extend/plugins/wp-custom-fields-search/
Thank you for the tutorial:
I tried it myself and it worked exactly as advertised, although I did end up with a slight problem that I can’t figure out.
I changed the tinyurl field to ‘video’ so that I could use it for my authors to easily embed video’s into the articles. I then use your shortcode to place the video exactly where I want it on the page.
Where I get stuck:
When I post the embed code into the input field, and submit the article, instead of seeing all of the code in the input field box, I only see the beginning <object= and then below the input field, I actually see the video player itself.
Is there a different type of field I should be using for video embed code?
While I LOVE the idea of being able to see the video below the admin input box after submission, it is very confusing to the author as they can’t see their embed code anymore.
This is hard because they may want to edit the embed code to change the player size etc…
also:
I use the kaltura all in one video plugin to add video’s to the site. Basically it works just like the gallery script, where you choose the picture you want and it inserts the shortcode into the article.
When I try to put that shortcode into the video field write panel, and then view the article, I simply see the shortcode, not the video.
Is there something in wp that stops the ability to use shortcodes within the custom write panel?
It works perfectly within the article body itself, so the plugin is not in error.
anyhow, it seems to be a great start, and with some tweaking, it may be exactly the answer I need.
thanks so much
side note:
I like how I can edit my comment, but please move the yellow blinking ‘edit comment timer’ below the comment, as it keeps expanding and contracting, making it impossible for me to read for errors with all the jiggling going on. LOL
@shawn,
Yes, I don’t think WordPress parses shortcodes in the custom input fields.
The reason you are seeing the video, is because the HTML that you’ve inputted into the field is being parsed by WordPress. A way around that is to use the PHP
htmlspecialcharsfunction. So all you have to do is wrap that around the value that is output into the input box.Thanks for bringing this to my attention. I’ll update my code in the article.
This is interesting, I never knew about this. I’ll try it out sometime.
@Spencer – I sent an email to the contact us on the website that is way to long for a comment if you have the time to read it.
I also wanted to bring up a point for all users trying to do this with wordpress-mu. It’s a well known ‘issue’ with wp-mu not showing images due to the mod-rewrite going on to hide the blogs.dir path.
Here is a piece of code I use from timthumb posted yesterday that solves this problem.
HOWEVER: I cannot figure out how to add this code properly to the above code to display the image on the article itself. Maybe someone can figure the 2 out?
// timthumb fix to get the path function get_image_path ($post_id = null) { if ($post_id == null) { global $post; $post_id = $post->ID; } $theImageSrc = get_post_meta($post_id, 'thumb', true); global $blog_id; if (isset($blog_id) && $blog_id > 0) { $imageParts = explode('/files/', $theImageSrc); if (isset($imageParts[1])) { $theImageSrc = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1]; } } return $theImageSrc; }In wordpress-mu using either of the below commands will not work as the ‘true’ path to the image is not known due to the wpmu issues. You ‘have’ to run it through something like the code snippet above to get the real url.
The ‘display’ code I would normally use is the first one below:
Anyhow, I am stuck on this, could use some help if anyone can make sense of what I am saying. If not I can email much better details to someone.
@shawn,
The function you have right now,
get_image_path, is looking for a custom field with a key of “thumb”. If you are using the function with my code, you would need to change that to the key you used in the new code, then edit the$theImageSrcvariable to equal the thumbnail part of the array:Hope that makes sense!
[...] Function Web Design & Development Blog?—? » Revisited: Creating Custom Writ…?—?A wonderful way to add many types of custom information to your WordPress blog. [...]
First of all Great Article! I have been testing out the More Fields Plugin which work quite well.
One question about this, is it possible to display a dropdown list of options instead of a text box? If you can this would be perfect for a project I am working on at the moment.
Cheers
Thanks for writing about this. I’ve been using Flutter, but it makes me nervous every time an upgrade of WordPress comes out. I’ll try using your code on a future project.
@Spencer – That worked perfectly once I figured out what was happening. What I did was rewrote my image function from timthumb and gave it different variable names. I then used that variable in your code to make the call and whaalaa it worked.
I read a bit about the ‘PHP htmlspecialchars function’ but have a long way to go to understand where and what to do. (would be really cool if you added ‘video embed field type’to your tutorial so I could see firsthand what you mean. I’m guessing others would also want to use video inserts as well as images and will have the same issue). I’m not giving up either way though as this is way to cool and I’m learning a lot today.
Ok, final question:
On my single.php I created 2 separate areas to show the thumb and the video. Obviously I only want the special divs with the thumb or video to show up if the user input a thumb or video.
I am currently using this logic
if ( get_post_meta($post->ID,'key', true) ) {I basically have 2 of the above, only one calls the ‘thumb’ and the other calls the ‘video’
The problem I am having with that logic is simple. If a user inputs a value into ‘thumb’ and no value into ‘video’ then my function outputs both.
I think it’s from my ‘if post meta {key}’ function accepting an input into either field as a positive response.
I tried changing key to ‘thumb’ and ‘video’ but that did not work.
How would I write an if statement that checks the object within the array to decide whether or not to display my output divs?
LOL—that last sentence sounds so confusing
[...] Function Web Design & Development Blog – » Revisited: Creating Custom Write Panels i… [...]
Hey Spencer,
Thanks for this revisit. It’s great to read the original post and then this revisit straight after. I’ve used your original post as reference for a few projects with great success.
Thanks again. Great blog post.
Cheers,
Matty.
@shawn,
I updated my code, and added the
htmlspecialcharsto it, because really it should be used on all inputs, not just ones that have videos. Check out line 10 in the code: http://pastie.org/657465 (it wouldn’t let me paste it in the comments for some reason.)As for your second part, you are still trying to check for a custom field with a key that does not exist. The concept of the updated way is to store all of the data in one row, with one access key, which is split into an array.
$data = get_post_meta( $post->ID, 'your_key', true ); if( $data[ 'video' ] ) : // do something endif; if( $data[ 'thumb' ] ) : // do something endif;Hope that clears it up.
@Daniel Anderson
You could definitely make a drop down. In the array of options, you would have to define what type of field you want to display. Then, in
display_meta_box()check to see which type it is, and display the corresponding input.[...] Function Web Design & Development Blog – » Revisited: Creating Custom Write Panels in Wor… One year after the first one, here comes the second evrsion of a great tutorial to tach us about cutom write panels in WordPress: how to create them, and how to to create them correctly! Have a look! (tags: wordpress plugin custom tutorial) Leave a Reply Click here to cancel reply. [...]
Great Article.
I find this to be the easiest and cleanest way when dealing with a lot of text info. When you get into image uploads and whatnot its much easier just to use flutter.
For someone that doesn’t know PHP, flutter would be good too.
Apparently there is something in the works for flutter, watch for it really soon.
Revisited: Creating Custom Write Panels in WordPress…
Learn how to extend the possibilities of WordPress using custom write panels. Taking our popular tutorial from last year and extending and improving the techniques to help you make the most of WordPress.
…
I’ve been looking for this as I’ve been customizing my personal blog, thanks
I seem to have everything working now with one exception:
I can’t seem to figure out what the ‘if’ statement should be on my single.php file.
I need a command that says ‘if there is a value for ‘image’ then….. output my div container
(I only want to output a special div holding the image if there is an image input into the admin panel, otherwise don’t show the div)
Right now I am using
This does not work, and seems to output whether there is a value inputted into the ‘image’ field on the form or not.
Could someone please provide some guidance on how to do this right?
thank you
@shawn,
Looks like my comment got stuck in moderation! Here is the code I posted above (http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/#comment-33356) :
$data = get_post_meta( $post->ID, 'your_key', true ); if( $data[ 'video' ] ) : // do something if there is something in the video field endif; if( $data[ 'thumb' ] ) : // do something if there is something in the thumbnail field endif;@Moodyjive,
Another way to improve your search is to use this plugin: Search Unleashed:
http://wordpress.org/extend/plugins/search-unleashed/
It will not only search custom-fields but also many others things. It also enables full-MySQL search (so code generated by plugins get’s searched aswell). And much much more .
@Spencer:
Is it possible to make an upload button in a meta_box (like [Browse..]), which will upload to the defined wp-upload folder (ie. wp-content/uploads/) and then put the URL to it in an input-field. Because I hate to explain to clients to use wordpress’ built-in functionality and then NOT click “Insert Image”, but instead click “file URL”, then select the link, copy it, close the window, go into Custom Fields, choose the drown-down-menu-item and then paste the link.
A meta-box/write panel for that would be awesome !
–
Thanks in great advance if you can do so,
–
TeMc
@Spencer — Thank you, it worked perfectly!
@TeMc — Looks like great minds think alike lol..
I was talking with a few other developers about the same thing. It’s amazing the steps we go through just so a client does not have to copy and paste anything… One would think it’s no big deal, but man, the headaches I get trying to explain the cut ‘n paste method you have to use in wp.
I was going to try and see if it’s possible to ‘replicate’ the media buttons on the admin, to add them to my custom write panel, so a user would simply click the media button in the panel and it would insert the ‘image/video/audio’ into the custom field box instead of the write panel input box.
I’m guessing that would not be to easy, but I can’t imagine it’s impossible.
In my case, it’s gonna be even harder, as Spencer said it’s ‘impossible’ for wordpress to understand shortcodes inserted into the write panel input fields.
I use the kaltura ‘all in one video plugin’ to add video’s to the articles. That plugin simply inserts a shortcode into the article for the video.
‘IF’ and that’s a big if from what Spencer said, we can find a way to get the custom write panel field to ‘parse’ shortcodes, and it can be combined with ‘copying’ the media buttons to the write panel, then the solution would be final.
Anyhow, that is a project for another day, as it is WAY beyond what I am able to build at this moment, though I do learn fast.
It would be really cool though, and would open many possibilities.
[...] Function Web Design & Development Blog – » Revisited: Creating Custom Write Panels in Wor… (tags: wordpress tutorial cms hacks php custom-field custom development plugin themedevelopment) [...]
Your “serialized array” solution is fine until someone actually needs to do filtering and other stuff with that data.
What if the user wants to show only posts where the “color” field is “green” and ordered by some date field?
You’d have to load ALL custom fields, unserialize them, then use PHP for the processing instead of MySQL.
Your new solution is great for attaching *metadata* to posts, but the old one was probably better for this kind of filtering.
[...] Function Web Design & Development Blog – " Revisited: Creating Custom … Almost a year ago (wow, time flies!) I wrote a little tutorial explaining the nuances of add_meta_box in WordPress, and how it can be used to create some nifty Custom Write Panels. It was a nice little script, and still functioned great. I use it on almost all of the projects Liam and I have, and up to this point, it has been great. However, for an upcoming project, I foresaw some problems. (tags: Function Web Design & Development Blog – " Revisited: Creating Custom …) [...]
[...] Function Web Design & Development Blog – » Revisited: Creating Custom Write Panels in Wor…. This entry was posted in lifestream. Bookmark the permalink. Comments are closed, but you can [...]
I just save the “Final Code” with a file, then named it with CustomWritePanel.php, insert the code
/* Plugin Name: Custom Write Panel ….
…
*/
to it like a plugin. edit the name, title, descraption to yours,
then, upload it to folder “plugins”, so, you know what to do.
_______________It can’t display Chinese, so, I wish you can understand my terrible English and it can help you.
[...] Creating Custom Write Panels in WordPress Créez vos propres champs additionnels avec wordpress (CMS style). A voir ! [...]
Very useful stuff, always working with WordPress Blogs – thanks
[...] ?????Spencer?????Creating Custom Write Panels in WordPress???pedfcba [...]
Brilliant tutorial thank you so much.
I’m using it on my posts page.
I wouldn’t mind adding it to the page pages, not just the post pages.
Is this possible and can it be separate to the posts fields?
Thanks again
@Jez,
in the
create_meta_boxfunction, change/add the following:add_meta_box( 'new-meta-boxes', ucfirst( $key ) . ' Custom Post Options', 'display_meta_box', 'post', 'normal', 'high' );to:
add_meta_box( 'new-meta-boxes', ucfirst( $key ) . ' Custom Post Options', 'display_meta_box', 'page', 'normal', 'high' );That just changed “post” to “page” show it will show up on the posts page. Right now, it will use the same options, as it calls
display_meta_boxesfunction. But with some tweaking, you could add different options.This is an interesting solution, but I have come up with a slightly different solution that allows me to use my custom fields inside of posts, using the Custom Field Templates plugin (http://wordpress.org/extend/plugins/custom-field-template/) and a little plugin I wrote that uses shortcodes: http://egord.in/1b
Let me know what you guys think!
Cheers Spencer, very handy.
Any chance you can change the ‘Key Custom Post Options’ title to anything you wish?
Or are you stuck with that being some default WP title?
@Jex Thopson:
No, you’re not stuck with that
See the “Final Code” line 18. You can edit it to whatever you wish
@Jez,
Yep, TeMc is correct. You can just edit the second parameter in
add_meta_box, which I’ve set toucfirst( $key ) . ' Custom Post Options'.this is brilliant! wasnt looking for this but since we stumbled across, it comes in handy!
Spencer can this be used when sorting posts via custom field date.
I.e you would normally use something like this..
1.With the custom field being date.
How would you incorporate yours in the above custom field of say
Into the above query.?
Or not possible?
Cheers
Whoops not printed…
Cannot show php
The code on this page, i.e how do you use this custom method in a query to filter say by date…
http://snipplr.com/view/13971/wordpress-sort-order-by-custom-field-for-specific-category/
it is very good sharing for wordpress blogs.Thanks.
Excellent post, really clear and helpful. Thanks for putting in the effort!
Alex
@Jez,
I’m afraid it can’t be done using this method. As Matt pointed out above, since it is all in one field, you can’t use it to sort.
If you set it up using the old method (http://wefunction.com/2008/10/tutorial-creating-custom-write-panels-in-wordpress/) you can sort it by the specific key.
[...] Revisited: Creating Custom Write Panels in WordPress [...]
Can I ask what probably seems like some not so smart questions? Well to you guys anyway?
I am wanting to use this code but unsure about a few things as I am newer to wp and wpmu with a basic knowledge of php.
Is all of this code suppose to be included in one file?
If so . . .
What file and is it a file that I need to create?
Is there a specific name I should give the file?
Where should I put the file, in the mu-plugins directory?
My goal is to create a recipe form in the write post page including text areas for the recipe name, description, ingredients, etc.
Thanks so much up front . . . Lana
@Lana,
You can either put all this into a single file, upload it to /wp-content/plugins/ and activate it as a plugin, or you can put it all in the functions.php file of the theme. If you are using WPMU, it would probably be better to make it a plugin so it can be used across all themes.
Thanks for the fast reply and the advice Spencer. I am using wpmu and want these changes to be automatic across the board for all new blogs. I will get on it and see if I can make it work.
Thanks for the code and in-depth instructions. Great article Spencer.
I had this working earlier but I do not know what happened. I thought a fresh set of eyes might help . . .
array(
"name" => "name",
"title" => "Name",
"description" => "The name of your recipe. The name of the recipe will appear on all printables, including canning labels."),
"from" => array(
"name" => "from",
"title" => "From",
"description" => "eg. From the kitchen of "Your Name Here", This will appear on all printables, including canning labels."),
"description" => array(
"name" => "description",
"title" => "Description",
"description" => "A short description of about 15 words. The description will appear on all printables, including canning labels."),
"ingredients" => array(
"name" => "ingredients",
"title" => "Ingredients",
"description" => "List your ingredients here.Copy and paste this <br ⁄> at the end of each ingredient to list them vertically. eg. 1 cup flour<br ⁄> 1 cup sugar<br ⁄>The ingredients will appear only on the printable recipe cards and cookbook pages."),
"directions" => array(
"name" => "directions",
"title" => "Directions",
"description" => "Add the recipe directions here. The directions will appear only on the printable recipe cards and cookbook pages."),
"story" => array(
"name" => "story",
"title" => "Story – History – Of Special Note",
"description" => "This is an area where you can add the family history of the recipe or an intriguing story about the recipe.The special note will appear only on the printable recipe cards and cookbook pages."),
);
function create_meta_box() {
global $key;
if( function_exists( ‘add_meta_box’ ) ) {
add_meta_box( ‘new-meta-boxes’, ucfirst( $key ) . ‘s Go Here’, ‘display_meta_box’, ‘post’, ‘normal’, ‘high’ );
}
}
function display_meta_box() {
global $post, $meta_boxes, $key;
?>
ID, $key, true);
?>
<label for="">
<input type="text" name="" value="" /> . . .
It is not writing the fields listed above to new blogs.
@Lana,
You are missing a few lines of code at the start of the document. Your first 3 lines should look like this:
<?php
$key = “key”;
$meta_boxes = array(
Thank you man!
Hmmm . . . not sure why that wasn’t included but it is included in the file that I created and placed in mu-plugins. It is the first 3 lines of the code. My apologies Spencer and Ahmed. I will try it in the plugins directory and see what that does.
- – - -
Nope . . .that didn’t work either. I will keep looking.
nice post…thanks
Can you paste the whole file to http://www.pastie.org?
[...] Revisited: Creating Custom Write Panels in WordPress [...]
Done . . .
http://www.pastie.org/668944
Just a note . . .
I have tried everything I can think of. I even used your original code from the “Final Code” above as is. All I continue to get is nothing, as if the file did not exist.
On the plus side, thank you so much for being so nice to go the extra mile to help a web monkey such as myself. We know just enough to be dangerous you know.
In case you need to know I am using wpmu 2.8.4
and if you need it . . .
l j m y e r s – at – h o t m a i l
nice tutorial. is it possible to add a textarea with wysiwyg-editor?
@Lana,
Are you installing this the same way you do other plugins? Everything in the code looks fine. The only thing I can think of is the way you are activating it.
I have made many mods to worpress themes and I have tried to tackle this issue. However this article has siplified the issues I was having and gave me the ability to solve the few quirks i was having
Hi Spencer, first of all congratulations on this article it has been extremely helpful. I just have one question. I’m using the code in my functions.php file so how would I implement the wp_nonce_field() function from there?
Thanks.
@Spencer,
I created the file, named it customwritepanel.php and uploaded ftp via Filezilla into my mu-plugins directory. From there and also when I tried it in the plugins directory, I see no where that would prompt me to activate it in the admin panel like other plugins. Did I miss something? If so, let me apologize for being a problem child up front. I just assumed that it was like many of the plugins in mu-plugins, that once uploaded, it was just there and working.
@Spencer,
OK – I tried moving the file to the plugins directory and did find in the plugins page that I needed to activate it. I did so and created a new blog but still nothing. I’m stumped.
Thanks for posting this…it was just what I needed for a current project I’m working on. I was using custom fields to add/format various content but this makes it so much nicer and more user-friendly for the people doing the content editing. Great work!
@Lana,
I don’t know much about WordPress MU. Have you made sure you allowed plugins to be used by other blogs?
Is there a way to add TinyMCE to the custom fields?
[...] Custom Write Panels http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/ Tweet This!Share this on TechnoratiSubmit this to NetvibesAdd this to Mister WongMark this on [...]
Hey Spencer,
Hope you don’t mind my adding this here. I thought it might be helpful to wpmu users and to you as well. I went on another search for something that worked with wpmu. For anyone who uses wpmu I found this . . .
http://www.clarksonenergyhomes.com/wordpress/projects/wordpress-plugin-add-dynamic-meta-boxes/
[...] Eigene Formularfelder im WordPress Backend [...]
Hi Spencer,
Great tutorial, but I went for the first article you did due to the flexibility of the keys and values for future use.
Can you spare me your advice? Everything works a treat except the only way I can call the information in the theme template is by using ‘get_post_meta’ . I want to use the ‘get_custom_values’ etc, but nothing works … even the basic ‘the_meta’ .
If all else fails I can work with ‘get_post_meta’ but I find it a little weird.
Anyway, thanks for the article.
Brian
Hey, thanks for this very great plugin. But i have a problem with line breaks in my custom fields. The wont show up when i echo the fields content. is there a way to achieve the line breaks?
Awesome work and code. Am going to try this out very soon. Thanks for posting and sharing!
Hi, Nice information, It is very useful for me. Thanks
Hi Spencer,
Regarding my above comment. The word in the WordPress forum is that when you create your own custom fields you can only access them by get_post_meta and none of the other commands.
Did you know that? Any ideas on a work around?
Thanks
Brian
@Brian,
I did not know that. I’ve always only ever needed to use get_post_meta. Why do you need to use something else?
@Ben,
Try http://php.net/manual/en/function.nl2br.php
Hi Spencer,
Using the info from WordPress itself -
http://codex.wordpress.org/Using_Custom_Fields
- you can see the following uses for getting the info from a custom field –
the_meta()
get_post_meta()
get_post_custom()
get_post_custom_values()
get_post_custom_keys()
….apparently when you make a custom write panel in the admin area you lose the use of all but ‘get_post_meta’.
I would like the use of all those for a large website I’m doing for a travel company. It would make it easier to set up a system where we have an area for comparing locations, dates, prices, etc. All these would be accessed by the ‘custom’ tags.
Anyway, this isn’t a stab at your hard work, I think it is more a flaw with WordPress. Thanks for the great tutorial. I am still using your code and am nearly finished adding tinyMCE to a ‘textarea’…. which I’d gladly share with you when complete.
Take care,
Brian
Just in case your asked in the future I have found this… http://wordpress.org/support/topic/222226?replies=5
I now have the tinymce displayed but the info I enter isn’t saving as a custom field. In fact it isn’t saving at all.
http://pastie.org/678400 in case you fancy helping out. You can have all the credit, I promise!!
I’m sure line 68 is where the problem is but I don’t know a solution.
Fix up the spelling of panel in the post image on top. It says ‘pannel’ right now.
Dude, thanks! =)
Very useful to me!
Hi Spencer-
Thanks a ton for returning to this topic. My biggest wish from the last custom write panel tutorial was storing the data in an array.
My only comment is why not move the get_post_meta call in line 32 of your final code example to line 30 and get it out of the foreach loop. I’m not seeing the need to get the meta each time around the loop. Correct me if I’m wrong.
-Gene
Try out http://pods.uproot.us/ it is something similar
Fantastic article!
I am wondering how to create a custom query based on a meta value using this system? Using &meta_key=image (or whatever) does not work in this case because the meta value is part of an array.
Thanks!
@em hr,
Yep, good call! It certainly should be outside of the loop.
@Randy,
You’ll have to use the old method here: http://wefunction.com/2008/10/tutorial-creating-custom-write-panels-in-wordpress/
Hey Spencer,
Thanks so much for this post!
I’m trying to use this for two purposes:
1) 7 custom images (per post)
2) 1 custom homepage image (1 per post)
SO, a total of 8 images per post.
Now the 7 images will ONLY appear on the particular post they are associated with. These are appearing just fine. Works like a charm.
The trouble arises here:
The 1 custom homepage image will appear on the homepage, after looping through the posts. I’m using query_posts on the homepage to list 2 posts and I’m using your method to access the custom field array. The weird thing that’s happening is the image is being displayed with the incorrect post.
In my test data, I have the URL for the image added to Post #2. Post#2 is the most recent post.
Post#1 is the older post & does not have the image URL added to the custom write panel.
However, after viewing the homepage, Post#1 is displaying the image from Post#2.
Help! I have no idea why this strangeness is happening. Thanks! If you need code, I can email you what I’ve got.
Big thanks for the tutorial! Custom write panels are so much easier to use (especially for clients) that custom fields.
I have a small problem though – I’m not sure if I should copy the final code to my functions.php file or create a separate file as a plugin?
I pasted your “final code” to functions.php and it seems to work great, but when I try to publish/save the post it returns a blank page (wp-admin/post.php). The values are saved however, when I return to editing that particular post. I’m guessing something is wrong with the saving function?
Here’s the code I pasted into functions.php: http://pastie.org/684053
A little update:
The final code works perfectly as a separate plugin. Publishing/saving posts works as intended too.
Is there any way I could change the code to use it in my functions.php file?
Hi,
This was very informative but quiet technical for people not so tech savvy to understand. Well I am one of these people. But I know that I will be able to use this informative resource for this website http://fromhomeworkers.com/entrepreneurs.shtml. Do visit us and leave your comment.
Regards
Priya
Here’s an update with the code I’m using when trying to display these images. Still not working properly, but no idea why. This works on an individual page, but not when trying to call images from multiple posts:
This is the code from the homepage:
http://www.pastie.org/685159
Thanks!
@Greg,
Where are you defining $data? You need to do it inside the loop, so it will get the custom data for each post.
@Justine,
If you just copied the final code, it should work. The only thing I can think of is that you don’t have the correct permissions to save a post. Are you logged in as an administrator?
I’m not sure entirely where $data is being defined.
Here’s the code I am using on the homepage, when running through my 2nd loop trying to gather the images(custom fields) from the relevant portfolio posts:
http://www.pastie.org/685159
WordPress is not really powerful like drupal
Hi, I am pretty new to actually do coding in wordpress, so this might be a dumb question…but is iti possible instead of putting the code into the functions php to put it into a plugin?
@Greg,
Take
$data = get_post_meta( $post->ID, 'ggamel', true )out of thewhileloop and put it afterthe_post()You have to loop through the posts, then the_post sets up the post meta (including ID) so now $data will have the proper post ID and can get the proper image.
@Eliwagar,
Yes. Just put all the code into a file, upload it to the plugins directory, and activate it.
@Spencer,
Yes, I made sure I was logged in as administrator. Tried again – removed the plugin comment from the file and saved it as functions.php (without any other additional code in it, like widgetized sidebars etc.). Now the whole admin area is a blank page, not just after saving the post.
Could you paste the final code to pastie with intends and all, if that’s not too much trouble, please? Thanks in advance!
Thanks Spencer! I did like you said and the plugin is running, but how do I make the input show now? The code I added to the theme that worked before (when the custom write panel code was in functions.php) doesn´t show the entries anymre
Oh…and I kind of got lost on the part how to make images work for wpmu user (I use mu)…could somebody post what code I have to add in which part? Somehow I didn´t quite get that…
[...] perception qu’ont certaines agences mal informées des possibilités de ce logiciel. Grâce aux custom fields on peut tout faire avec un WordPress : catalogue de produits, calendrier d’évènements, annuaire [...]
[...] Ways to Customize and Personalize your WordPress Blog WordPress Visual Cheat Sheet Revisited: Creating Custom Write Panels in WordPress 18 Useful Tricks To Speed Up WordPress & Boost Performance 30+ New Useful WordPress Tricks [...]
Hi Spencer,
great post, thanks a lot – your codes helped me a lot through all my wordpress projects! Though I have a question:
I learned a lot from your first version of this code and used it for my custom write panels. I also made a little plugin that let me duplicate a given set of custom fields and storing them all separately (similar to flutters functionality).
Now with my basic php knowledge that was pretty unperformant and a little buggy, plus I ended up with often more than 20 custom fields per post. So I implemented your new code for the panels I am creating – but I’m stuck with the one that can be duplicated.
How comlicated would it be to use this code and save X versions of the data array to one custom field each? So far I used to set up my set of custom fields, duplicate this set as needed with jquery, and storing the total amount of sets in a hidden custom field for displaying and saving
- and I think this could be done with those data arrays much more easily, but I’m not quite there yet. Could I duplicate the key and simply looping through all my sets when I save or display the panel?
(that’s my old code: I know, it’s a mess, but it works http://pastie.org/689444 )
Hey that was a really nice post… I work in a website designing company and appreciate it a lot…
Nicely done. Thanks for sharing this!
@Kristof,
Why do you want to save multiple versions in the single array? The easiest way I can think of would be to add another dimension to the array, and just add the new data to the array.
Array
(
[0] => Newest Info
Array(
[0] Custom Field
)
[1] => Older Info
Array(
[0] Custom Field
)
[2] => Even Older Info
Array(
[0] Custom Field
)
)
Is that what you were talking about?
(Sorry about the spacing, WP takes it all out)
This plugin
http://wpgogo.com/development/custom-field-template.html
Do the some jobs right?
Hi Spencer,
thx very much for your answer, but it’s not quite what I meant. I’m using wordpress as an event manager and I’m using a custom write panel to save the venue and some side infos on the bands – I should have said that right away, I think it makes the indea much easier to understand
I already managed to save the data the way I want. I’m creating one custom field for each band (eg set of data) and saving an array to it. Here’s the code:
http://pastie.org/690514
Now I get one custom field for each band, stored like:
band_1 – a:4:{s:4:”band”;s:11:”Band Name01″; …
band_2 – a:4:{s:4:”band”;s:11:”Band Name02″; …
etc…
Yet until now, I have to set the amount of fields manually in my “numbands” field and save the post to get the function called again and to create the amount of input sets I need.
I was wondering if there is a way to refresh the write panel with a button, or even to add sets of inputs via jquery, withouth having to hard-code all the form in js?
Great article. What I am trying to do is add a button that will convert a post to a page and a page to a post. I know there is a plugin to do this, but I wanted to build it into my theme.
I would like to add a button and, if clicked, execute some PHP code.
Thoughts?
It would be nice to see plugin or way to compare values to each other, for example prices.
[...] Function Web Design & Development Blog – » Revisited: Creating Custom Write Panels in Wor…. Tags: Write Panels Be the first to start a conversation Click here to cancel [...]
Excellent follow up post Spencer, looks much cleaner.
Hi,
Sounds like a really good idea but i cant seem to get it to work!
I uploaded the final code into a plugin, and activated it, and the fields showed in my post.
But when I update the post the page goes blank and nothing shows. Then when I check the post nothing is shown in here also.
The example at the top about events is exactly what I want, and once I understand how to make that I can customise it to what I need.
It would be good if you could show how to add the custom fields and then go onto showing how to display them.
The link between this is missing for me and I am failing to make the code work.
Would it be possible to show the whole process?
From implementing the custom field code > showing how to display the data?
Any help would be great.
Thanks
Chris
@Chris,
There is a whole section at the end of the article about Implementation. What part are you having trouble with?
@Spencer
I am adding the code to a plugin, it activates ok and everything works.
But maybe I am not putting the code for the while loop in the right place. Im not sure I am following the instructions above.
Also I have added into the body of the code but it dosent show.
Could you not make a plugin that auto feeds in the correct code into the while loop?
I’ve been avoiding wordpress, and rather used blogger but cos of this i’m willing to try it one more time
@Chris,
Then you wouldn’t have control over the data that is being displayed, or where it is output.
Just make sure it is that is inside the
whileloop, and that the information is actually being saved to the database.I can’t get this code to save the fields. They show up but won’t save into custom fields.
This is fantastic and really takes WordPress as a CMS to the next level. One question I do have is… Can this be used for pages as well as posts?
Hi Spencer
Great work on the code, If I wanted to implement this script to specific categories or specific pages, how would I go about doing it?
Rob
I’ve spent a lot of time and the way this code is, it will not save the fields.
Is this meant to be used as a plug-in?
If so could someone be kind enough to send a paiste link to this code working as a plug-in?
@John MacMenamin
My implementation of this concept works as a plugin with the Custom Field Templates plugin and shortcodes. Check it out here: http://egord.in/1b
Let me know if that helps you at all since its more self-contained.
@Eugene Gordin Thanks for the recommendation but I’m trying to add this to a theme. I need it to be setup from the start so people who don’t know php and quickly add three custom field keys to their posts.
BTW I have WordPress 2.8.6 and no plug-ins active.
I need keys of:
image
audio
video
If I can get this venilia script working I can add\change the fields.
If someone could take this code and get it working as a plug-in .zip that would be amazing!
Awesome tutorial!
Got a question though. How would I get my custom fields to insert data into a separate table. I already read how to create plugin with a your table, but it fails to show you how to insert data from the admin panel.
Any points in the right direction would be helpful.
Great work on the code, If I wanted to implement this script to specific categories or specific pages, how would I go about doing it?
Rob
Spencer is there anyway for me to do this using “press-this.php” found in wp-admin folder?
I’d like to update on the go, without having to login to WordPress site and copy paste the whole thing.
I’ve tried, but it went horribly wrong. So I decided to give it a try myself. (I am not a programmer, but a web enthusiast)
If you could you shed me some light it will be tremendously helpful.
http://wordpress.org/support/topic/333549?replies=1
I have used what you have written above and it works well. The only things is, is that I want to display different write post panels, for pages and posts. Therefore I use the code above to create the one for posts, and add more boxes as necessary.
Then if I add another lot of code to functions.php, change the $key to a different name it breaks the site. How would I create two lots one for pages and one for posts.
I have managed to alter the one above for pages and not posts as you described however I can’t get two at the same time working.
Also when I used custom fields I always check the custom field is present first, however when using this method can you still do this and if so how. I use code to check the custom field is ‘true’ or present first and then echo it if it is
However doing this with your code, where I have post-img as the key, this holds all of the different meta values so I can’t check them individually.
Would love to get this working and then I don’t have to rely on plugins. You help and time would be very much appreciated.
Thanks.
I didn’t try this trick yet but it seems to be a great one!
Is it possible to make different models of post/pages with custom write panels?
[...] There’s Flutter, PODs (just found out about this), Magic Fields (fork of Flutter), Custom Write Panels, and more. From what I’ve seen, Flutter, Magic Fields and PODs are the most powerful among [...]
Thanks dude
Thanks!
I already knew plugins like Flutter, PODS or Magic Fields.
But I’d like to know how to do different models of custom write panels without a third-party plugin. Just for the pleasure of learning something new. That’s why I like this very interesting post!
[...] are plenty of other ways that you could use this to improve your themes. Spencer has also written a follow up to the orginal article where he makes some improvements the to code being [...]
This is a really great set of functions. Will be using it quite frequently I can see. Thanks a million!
I made the input of my custom field a textarea, and now it’s not saving the information.
Is there something special I need to do?
The right information in the right time ! Thank uuuuuuuuu . It was a really help for me ! we expect more from uu , keep going !
Nevermind. I had neglected to move the value to withing the textarea tags.
Thanks for the tutorial! Excellent!
I was able to get the TinyMCE editor to work by defining the textarea tag as “theEditor” — however, now it’s not saving the paragraph tags … the other tags yes, but not paragraph tags.
Any thoughts?
Hi Spencer, many thanks for your great work in sharing this technique. I have been looking for a way to simplify custom fields entry for some time.
There is one feature of wordpress custom fields that I would like to retain: the ability to enter multiple values with the same key, for example, to enter multiple event dates.
I wonder if a custom admin panel field can be optioned to enable duplication by a user.
Great functions Spencer.
One question… that I didn’t see in the current comments..
Is it possible to have two sets of the custom fields on two different pages?
ie. I changed the var on the one function to place this on my pages instead of posts and it works great. I have setup about 4-5 fields to use for slideshow images on the home page run by jQuery.
I’d also like to have a different set of fields on some internal pages to place img files for a simple image gallery.
Is it simply making a new set of functions with some var name changes?
thanks!
Great tutorial! Thanks for taking the time to put this information together, very helpful!
Hey,
Great tut.
I was wondering if it’s possible to create more than one drop down box/write panel?
I’ve been looking for this as I’ve been customizing my personal blog, thanks
This is interesting, I never knew about this. I’ll try it out sometime.
[...] for adding each individual project’s details. We created one similar to Function’s Revisited: Creating Custom Write Panels in WordPress article. Below a screenshot of our custom Project Details [...]
Nice article, thanks for sharing.
Warning: include(/wp-content/themes/mytheme/functions.php) [function.include]: failed to open stream: Permission denied in /www/kaczkowski_www/www/wordpress/wp-settings.php on line 715
Warning: include() [function.include]: Failed opening ‘/wp-content/themes/mytheme/themes/k2-kaczkowski/functions.php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /wp-settings.php on line 715
Anyone knows whats wrong? functions.php is 644 @wordpress 2.9.1
Fixed: there was an
get_post_meta($post->ID
instead
get_post_meta($post->ID
Nice tutorial, it works great and it’s very useful.
Thank you!
its very appreciable to do the best result among the corresponding areas.
I’ve never really liked wordpress, but I guess I’ll try this.
Useful info which can be used. THANKS
very good tutorial.
But what if i want to use different boxes, let’s say, a dropdown list, a text area and maybe others.
how can you alter the code to insert different type of input.
i tried using “case”, but i can’t get it done.
Excellent article, i’ll use it in a custom website i’m doing for a client
Thanks alot!
I’m gonna try this urgently! Thank you mate!
help!
ID, ‘tinyurl’, true ) ) : ?>
but no work! please help me.
help!
but no work! please help me.
Hi thx,
Excellent article, i’ll use it in a custom website i’m doing for a client
great article, thanks for sharing
Both are AWESOME tutorials! The first saved my ass – I’ll spare you the details. You might consider linking to the first post at the beginning of this post.
I have the same problem as Justine when I hit the save button I get a blank page but everything seems to be saved though. I have to go back to see the admin page.
@justine If you found the solution other than having it as a plugin I would be interested.
Thanks for this great site !
Great tutorial, it works and it is very useful… Thnx
Hi Spencer! Please tell me how to add video to post by custom fields? What code need to be in function.php and in Page template,I can’t understand. Please! Thank you!
Hi Buddy!!!
This revised word press theme can how far creative..??? reply me ASAP..meet again.
Hell Yeah !
Thanks that is a very valuable tutorial.
Great Tutorial!
Does somebody managed to fix a second WYSIWYG editor into a custom field?
Trying to get this working for ages.
Thanks in advance
Hello
Looked through the comments but i couldnt find the answer….
Basically i want to create a few different write panels, one for posts of x type, one for posts of y type etc.
How would i go about doing this? If i have all the fields i need in one write panel it is rather large and unwieldy
thanks for your help.
David
Great write up, I am attempting to learn using custom write panels as I’d much rather use this than a plugin. Thanks for taking the time to write this detailed post. I do have one question; the version you posted displays single line text fields. How do I integrate a WYSIWYG box on top of this? ..and is there a way to remove the default WYSIWYG editor at the top?
Thanks!
[...] Now this is an important tutorial to follow as it will make your life easier if you use custom fields a lot. Most premium themes already include that option now, but it never hurts understanding what happens behind the curtains. This tutorial might be harder to follow but the author provides the code to copy and paste and try for yourself. Check it out and the Latest revisited version [...]
Simply awesome tutorial!!! Been looking for something like this and this really helped out with a project I was doing. Keep it up.
l want to try this and see bec looks usefull
Nice tutorial.
I always want to create more creativenesses in my all designs. I really appreciate your design indeed. Very inspirational. People have to be more creative and innovative to explain their particular designs. Keep it up
Today the concept of every design either website or logo has changed. People concentrate on more innovative and unique designs. I really like it. Keep it up
You have really done a great job. Quite inspirational menus indeed. I like it and always appreciate unique designs. Thanks
Thanks a lot.
Great article!
New ideas and discoveries are always welcome especially for the improvement.Blogging always require a design.They are much needed to make the article more attractive to read.
Hey, i have been searching through comments to see if you already answered a questions like mine, but i’m trying to add another meta box to handle a second set of data but have no idea how. Any ideas? code samples? Thanks in advance!
Very useful information. Thanks a lot!
very practical. Thanks a lot.
Great Tutor. Thank you.
very nice, thanks…
Hey Spencer,
Great tutorial! Everything seems to work great but I’m having a problem when exporting/importing with WXR. The imported saved content from my custom write panels are showing up as grouped custom field values associated with 1 $key — as expected (screenshot; themekey is the $key variable i’m using). However, after importing posts into a new blog, my custom write panels show the value “a” instead of the entered values (screenshot).
It looks like the data is being saved, and exported/imported which is good. However, the data isn’t being moved correctly. I get that the concept of the updated way is to store all of the data in one row, with one access key, but it seems to create problems when you import/export things this way.
Any ideas?
[...] at Function’s website there is a good tutorial on how to manually code fields into your Write Panels, [...]
Hi !
I have a little trouble with the implementation of the code.
When i put
$data = get_post_meta( $post->ID, ‘key’, true );
echo $data[ 'image' ];
I don’t see anything, but when i put
$data = get_post_meta( $post->ID, ‘image’, true );
echo $data;
It works! but i don’t want that…
Great job you have done, i will also implement that for my Dallas Website Design company.
Thanks
I really appreciate this.This is very nice and also useful.
creative designs
Very nice. I actually have your old one working with textareas, checkboxes and the like, instead of just text fields – I find the old tutorial indispensable. This new one looks very promising.
One note though – I’m working on WordPress 3.0 Beta – which I understand *is* beta right now – but it’s throwing up an error:
Warning: Cannot modify header information – headers already sent by (output started at (path to plugin file):91) in (path to WordPress)/wp-includes/classes.php on line 1697
It’s also throwing this up:
Warning: htmlspecialchars() expects parameter 1 to be string, array given in (path to plugin) on line 77
The lines in question are these:
$data[$meta_box['name']] = $_POST[$meta_box['name']]; (for the first)
and
<input type=”text” name=”<?php echo $meta_box[ 'name' ]; ?>” value=”<?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?>” />
I’m still trying to figure out the solution (already done the “whitespace checks”), but just a heads-up!
Ha! It appears I figured out the solution – appears *for now* because it takes a few minutes for the error to show up (I believe it happens on autosave). If you fix one, the rest is fixed as well. So basically the fix is like so…
change this line:
<input type=”text” name=”<?php echo $meta_box[ 'name' ]; ?>” value=”<?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?>” />
to this:
<input type=”text” name=”<?php echo $meta_box[ 'name' ]; ?>” value=”<?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ][0] ); ?>” />
no more errors, and the proper values show up. Hope that helps someone!
As I have already said it: great tutorial!
But it seems I have found a curious behavior when exporting the WP database then importing it (when moving a website for example):
all the entries generated are in the postmeta tables but don’t appears in the custom write panels of the posts or pages… so they don’t display anymore in the website.
Is there anyone who already encountered the problem and know how to solve it?
Thank you for great tutorial .. it’s useful.
I’ll come back to do practice on your tutorial.
Cheers,
thanks for the article, very helpful
This helps me a lot with my projects. Thanks
Great information! I just recently got my own WordPress account. Am impressed with it so far, but knew I could make it work better for me. Thanks!
You might want to update this code to use register_settings and settings_field and let wordpress worry about nonces and such.
Great tutorial!
How would I write a conditional to show the output data?
For example,
if data for tinyurl exists {
} else {
Do nothing….
}
Thanks!
[...] aux custom fields on peut tout faire avec un WordPress : catalogue de produits, calendrier d’évènements, [...]
Edited *
I can not understand in any way (
This is a good technique but it breaks the wordpress import/export feature.
If you export data then import… the data will be smooshed into a single custom field. The custom fields defined using the above approach will be populated with bad data.
Just a heads up!
[...] Revisited: Creating Custom Write Panels in WordPress – [...]
I’m learning the basics of php coding and I think your tutorial will be a good example for me to practice. Thanks.
Great post, Thanks for sharing
thanks so much for publishing this useful information
Awesome post. Thanks for wonderful share
fantastic advice and content, will look into this much more thanks
Hi,
Thanks a lot for the great article. Can anybody help me in adjusting an admin panel based on the AgentPress theme by Studiopress.
I have successfully modified the write panels to include various text options but I want to include checkboxes and dropdowns, but the site doesnt seem to store the values in the checkboxes and dropdowns..
anybody know what to do?
Rashid
is it possible to display a dropdown list of choices rather of a text box? If you can this will be exemplary for a project I am working on at the moment.
Your information help me a lot. Good job.keep it up. Thanks!
Delta Hotel provides services like Delta Resorts,Hotel Reservations, Hotel Deals and Room Rates along with delta hotel packages atcheap price.
[...] coding and WordPress—you just want to understand the code—I recommend a different tutorial and update (to the same tutorial) by Spencer at Function. You can also find code below, but this article is geared towards [...]
wow!!!greatest template. I will use it…
But as placing a (textarea and input) together under the other options would be great to put a (textarea) with included editor. Please help me is great!
Can this work with the new custom post aspect of WP3?
I’ve created a new post type and its only showing up in the default posts, not my new created one?
Thanks for this, I’ve got the same problem with checkboxs.
work filling your eyes I congratulate you all on this issue thanks
thanks ya i used this tips for my website
[...] http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/ [...]
your tutorials is very help me thanks
thanks for this i’ve been able to get this working on a previous theme but a new one I’m working on I seem to be having a problem.
I actually want 2 sets of write panels , 1 for images and 1 for a post icon which will pass a class to the blogs loop.
I can get them all displayed ok , allthough just for aesthetics sakes I’m wanting them as 2 sets of panels instead of all in the one.
What seems to be the problem though is that they don’t seem to be saving correctly , (when i use them in the same panel) , all of the information is stored int he same array but uses different values and is sorted (for display) via a “type” that is sorted in the foreach() loop inside the display function.
If possible , can anyone give me an idea as to how I can do the following
1. display these options inside 2 panels
2. save the information as needed
3. implement these in the loop inside my blog page (though i think there wouldn’t be too much difference from the original $data variable.)
Spencer , reading in your last post you noted that the 2 panels could be done via the create_meta_box function , something about using a foreach() to display each panel , what would I loop through to get this working (the original array ? )
any help from anyone would be great , thanks
Great job you have done, i will also implement that for my Dallas Website Design company.
Thanks
Great job you have done, i will also implement that for my Dallas Website Design company.
ThanksUsed Trailers
very helpful posting
Thanks for posting this. When i have used WordPress for small/medium sized sites i have used Flutter, i found this great for clients as opposed to explaining to them how to input custom fields themselves. However, it does seem to be a little bulky and comes with too much baggage that can slow my back-end down too much, next time i’m going to follow this excellent article. I’m not a big programmer but this is great code and i understand it (i think), so it should be interesting to implement on my next project.
Will this work with WordPress 3.0 Custom Post Types?
This is great if all your inputs are text inputs… but what if you want to use radios, checkboxes or select options?
I have the same questions as Guy,
I’d like to add select options and bigger text field as well….
I found a solution:
To add a text field with a textarea use:
As you can see I added “type” => ‘textarea’, to this.
Now under $meta_box_value = $meta_box['std']; replace:
with:
if($meta_box['type'] == 'textarea') { echo '<textarea name="'.$meta_box['name'].'_value" rows="5" cols="30">'.$meta_box_value.'</textarea><br />'; } else { echo'<input type="text" name="'.$meta_box['name'].'_value" value="'.$meta_box_value.'" size="55" /><br />'; } }As you can see we add a if statement to look for a meta_box type of textarea. If is finds a meta_box with the type of textarea, change the input type=”text” to a textarea.
With additional meta_box types you could add radio buttons, drop down and other fun stuff…
In the code above replace
&.gt; with >
and
&.lt; with <
I added the . between & and lt; to keep it visible… sorry about that.
….
[...] (for me, anyway) were the Userextra/Usermeta plugins, and the function for Custom Write Panels, the tutorial as written by Liam McKay over at wefunction. LOVE Liam. He’s so smart – and very kind and helpful. But I feel all [...]
[...] been happily passing out my code to anyone who’s asked for it. (I think it’s because of this comment I left on Liam McKay’s site. I guess it piqued a lot of [...]
Wonderful read, and excellent points. Cheers
Thanks ThaClown! Why didn’t I think of that?! Duh. PHP is not my forte.
[...] So now I needed to put on my PHP hat and find a way to get what needed to be done and avoid the drawbacks listed above. I knew right away that I would need to use custom write panels to make everything easy to look at and use. I wrote about using them here, WordPress Custom Write Panels & prioritizing what to display and used this as my reference, Revisited: Creating Custom Write Panels in WordPress [...]
Thanks for the code Spencer.
One question though.
How would the new write panel code be integrated into a query_posts loop?
meta_key=key&meta_value=?
similar one and i had been just wondering should you get lots of spam comments? If so how do you prevent it, any plugin or anything you ca
Thanks a ton for returning to this topic. My biggest wish from the last custom write panel tutorial was storing the data in an array.
Part of the functions works with WordPress 3.0 Control Panel. The code to display at the front-end doesn’t show any output.
Sorry My mistake. Everything works fine. From back-end to front-end with WordPress 3.0.
[...] going to write a new post in a few days about the even newer way I create my meta boxes. It takes out all those nasty arrays, and just goes back to the [...]
Is it possible to setup different write panels for different custom post types?
Do you have to create a new new/create/save function for each set or is it possible to define all the metaboxes in $new_meta_boxes and separate them out in the create_meta_box function?
Thanks!
thank : Put that inside the while in the WordPress loop. Remember to change “key” to whatever value you entered in the script. That variable is now holding the array of information stored in the database. So you can simply access it like so:
[...] the topics I like to talk about. I’ve not only written about it once, but I followed that up about a year later. But, here I am again, with new thoughts on things, and a different [...]
wow!!!greatest template.
Thanks!!!!!1
wow!!!greatest template.
Thanks!!!!!
Nice Post.
wowhhhh this is a complete and good post
wow!!!greatest template.
Thanks a ton for returning to this topic. My biggest wish from the last custom write panel tutorial was storing the data in an array.
Thanks for sharing the code
Hi, Spencer, why are you so talented in this field? love your post. I really enjoy them when I get a chance to your posts.
This packaging is the physical manifestation of many hours of intense collaboration within the collective. We immersed ourselves in these projects with the conviction that good design is meaningless unless it is inspired by something amazing. The packaging was not designed to look good on a computer screen, but rather to have genuine, tactile appeal in a natural habitat. These bottles look best on the shelf, in your hands, in your refrigerator, and on your best friend’s dinner table.”
Top 10 DVDs
Thanks for sharing the code to get some great looking custom write panels
Unbelievable how easy you made the tutorial, Thank you! LT
Really nice! Thanks.
This tips only for blog that used the wordpress.org platform. Like us knew dofollow inside blog will be regarded as backlink by search engine. But in the WordPress acomment field was used NoFollow as default. We can change to DoFollow by using DoFollow plugin, unfortunately because several bugs certain, recommended to change them with manual method.Top 10 Books
Thank you for the tutorial
Thanks for your great tutorial(s). I really enjoy them. Just merged it with another one with an OO-approach on custom fields and meta boxes, and voilà: It works! Thanks!
Thank you for this great tutorial. I am kinda of beginner on wordpress and i am really trying to find as many tutorials as i can find.
It is really good.
Thanks
tnx tnx tnx
Yes, this is what I needed!
I’m trying to create something for a school wordpress-based and this is helpful.
Cheers!
Thanks for sharing the code to get some great looking custom write panels now.
Thanks for this code, it is very helpful.
Nice information, It is very useful for me. Thanks
This codes is very useful. Thanks for sharing.
Thanks for sharing the code to get some great looking custom write panels
Thanks for this, I’ve got the same problem with checkboxes.
Thanks for sharing the code
It is really good.
Thanks
I look forward to more similar posts that are simple to understand. I have read many entries across blogs that speak to the audience as if we already know about social media, though many of us are grappling to understand what it really is. juegos de bob esponja
I look forward to more similar posts that are simple to understand. I have read many entries across blogs that speak to the audience as if we already know about social media, though many of us are grappling to understand what it really is. that is great.
juegos de bob esponja
juegos de bob esponja
This is very inspiring.. Thank you broe
Thanks for this posting.
Wonderfull great thanks really
Oh thanks posting very good
Wao this is very good performance. good good good
Really Creative panel.
Thanks
Great post and good job. Very much informative.
Native American Moccasins are greatly highly appraised even today. The reputation of Native US Moccasins is astounding. Mens MBT Sports shoes US Indians are to some extent nomadic so they fashioned boots that have flexible but sturdy soles and are durable abundant to withstand the elements.
Hi, there!
I was unable to pull custom_field value through
[CODE]
$data = get_post_meta( $post->ID, ‘key’, true );
[/CODE]
I went through so many tutorials online and at last.. found solution.
If the above code doesn’t work for you, try the below one.
[CODE]
$data = get_post_meta( get_post_ID(), ‘key’, true );
[/CODE]
I hope this helps somebody.
OH NO!!
it’s not get_post_ID(). Sorry, my mistake.
Please replace it with “get_the_ID()”
Really good panel.
Great post, thanks for the code and the help!!
Very smart and unique, Thank you for sharing.
good post..like to this
Thanks for writing about this.
Thanks for this, I’ve got the same problem with checkboxes.
Thanks for posting this…it was just what I needed for a current project I’m working on.
i always get my hotel reservations in advance specially during peak seasons;~*
I went through so many tutorials online and at last.. found solution.
[...] basis van de uitstekende handleidingen van Dave Taylor en WeFunction heb ik mijn uiteindelijke script gepubliceerd om de mogelijkheid te krijgen verscheidene types [...]
Really great stuff!
Thanks for this nice tutorial
I am happy to find this post very useful for me, as it contains lot of information UGG Bailey Button I always prefer to read the quality content and this thing I found in you post. Thanks for sharing.
I am happy to find this very useful for me, as it contains lot of information. I
always prefer to read the quality content .
ugg outlet storeThanks for sharing.
Great we will be using this on our next project, lol at the comments.
This is interesting, I never knew about this. I’ll try it out sometime.
i love to read this post because now a days i am crazy about wordpress thanks
bosch beyaz e?ya servis thanks nice information
plazma kesim hizmeleri
Its very good post. I am beginner of php. I am very much interested of your code. Very thanx
Wooooooooooooow…. What a fantastic tutorial? Really Amazing.. Keep going on..
Great informative blog thanks for provides us such useful information.
le tissu est un matériau respectueux de
i always make sure that i got a hotel reservation at least 1 week in advance to ensure that i got a reservation .;”
garantili franke servisi mobil servis
This article is very helpful to me, thank your share.
Very nice and powerful!
Very useful articles, thank you for sharing
nice article for good blog thanks.
thanks mese lamine parke
good post.thank you so much.
thanks nice article time
of course we need to know our family history so that we can share it to our kids ~,;
thank’s for sharing this!it’a great post!
Thanks for clarifying that. I love returning back to this site and reading the quality content
Kartvizit Tasar?m ve Bask? Merkezi | selefonlu, arkal? önl
http://www.ekonomikkartvizit.com kartvizit fiyatlar? kartvizit, matbaa, ofset matbaa, bro?ür, katalog, magnet, tasar?m, haz?r tasar?m, design, ?ablon, internet sitesi, grafik tasar?m, tasar?mc?, tasar?m firmas?, matbaa, bask?
thanks nice panels for wordpress
Firmam?z Daikin ürünleri üzerine Özel Servis olarak hizmet vermektedir.
electra klima ariza ve bakim hizmetleri
ferroli kombi istanbul thank you
sup, this is good stuff, Im happy I clicked on this article cos i was digging for something similar since yesterday. much appreciated!
Nope . . .that didn’t work either. I will keep looking…
nice article thanks. try working plugin
thanks good plugin and wordpress
is amazing wordpress plugin thanks
Great!!
ugg shoea
Thanks for these wonderful icon! Will use it sometime.
Great we will be using this on our next project, lol at the comments.
thank’s for sharing this!it’a great post!
Wonderful information. Thanks for sharing
Thanks a lot for the great article. Wonderful read, and excellent points. Cheers
http://fozoligroup.mihanblog.com/post/comment/1
Offering free tools for blogs and Web sites – weather tools, news and Prayer
ümraniye buderus kombi servis hizmetleri
thanks avcilar beko servisi beyaz esya ve ankastre
vestel avcilar servisi, thnks
Is there any way I could change the code to use it in my functions.php file?
Wow! Great it’s a great way to put your planning for other.
Thanks very nice internet sites.
Thanks ……………….
good
good
good
good
Thanks Cheers ?
good
good
good
good
Beau travail.Merci. Il s’agit d’un post vraiment super.
Nice post.. Keep going on
Web sites – weather tools, news and Prayer
the text look more like web rendered typewerfgfgfgrewwwssdfgg
I see no where that would prompt me to activate it in the admin panel like other plugins. Did I miss something? If so, let me apologize for being a problem child up front. I just assumed that it was like many of the plugins in mu-plugins, that once uploaded, it was just there and working.
anti-aliasing off to make the text look more like web rendered typehkuyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyuuuuuuu
That is why it calls my attention to visit it again for more source of new informationtytyuttttttt
I see no where that would prompt me to activate it in the admin panel like other plugins. Did I miss something? If so, let me apologize for being a problem child up front. I just assumed that it was like many of the plugins in mu-plugins, that once uploaded, it was just there and working
rubenis klima bakim ve montaj servisi
aeg beyaz esya ve ankastre servisi
cartel klima istanbul avrupa ve anadolu yakasi servisi
mitsubishi electric ve heavy klima servisi
sharp elektronik servisi
schaub lorenz televizyon ve elektronik servisi
eca kombi ve klima servisi. bakim ve montaj hizmetleri acil servis
protherm leopard kombi ve kazan servisi
Nice blog about creating custom panels. Thanks
SEO India
hat is why it calls my attention to visit it again for more source of new informationhfghfgnvgnvbnvbnvbnvbnhgjghhhhhhhhhhhhhh
hat is why it calls my attention to visit it again for more source of new informationhfghfgdcvdcvvcvmnbkghjdadsfs
tnanks it was very useful
let me apologize for being a problem child up front. I just assumed that it was like many of the plugins in mu-plugins, that once uploaded, it was just there and working
again soon, but we are aware of them problem and working to get it fixed.
avrupa ?s? kombi yedek parça ürünleri
Australian was worried that the ugg outlet boots was too much of quirky Australian design to make a hit in the US. ugg boot on sale eerewqqq
hat is why it calls my attention to visit it again for more source of new informationfdsertyu
Nice article about creating custom panels. Good job
SEO India
Really good php code. I am begginer of php
Part time jobs
Offering free tools for blogs and Web sites – weather tools, news and Prayerhkopder nave my youyhgmnmnm
Offering free tools for blogs and Web sites – weather tools, news and Prayerhkopder nave my your:ifhn?ggfvbnç f
Offering free tools for blogs and Web sites – weather tools, news and Prayer:ökpootytrs
I will suggest all the people, who have planning to create custom panels to go through this post at least once.
Offering free tools for blogs and Web sites – weather tools, news and Prayer:i??aswqa
Offering free tools for blogs and Web sites – weather tools, news and Çöldko?fjkfg
Offering free tools for blogs and Web sites – weather tools, news and .i?i?ds?gfd?lgfldkfgv
Sounds interesting that you give such idea.. Well thanks, its a great help… :gfhll?f
Sounds interesting that you give such idea.. Well thanks, its a great help
fpdgolpdf
Sounds interesting that you give such idea.. Well thanks, its a great .ç?llkfdkl
I am very interested with creating custom panel for wordpress. Thanks
istanbul bosch servisi 7 24 hizmet kalitesi
istanbul siemens beyaz esya servisi
goodman klima bakim ve ariza servisi
Sounds interesting that you give such idea.. Well thanks, its a
??pp
Sounds interesting that you give such idea.. Well thanks, its a
??ppp
Sounds interesting that you give such idea.. Well thanks :öghlkghkkghk
vaillant kombi bakim servisi
ferroli kombi ariza servisi
buderus kombi bakim servisi
nlp kimya kopuk kesici
zeytinburnu vesel beyaz esya servisi
vestel avcilar bakim ve ariza servisi
istanbul bosch gürpinar servisi
york klima servisi
Wow, I didn’t realize how many big sites were running on komple resedevdfödll
god download filme .
Offering free tools for blogs and Web sites – weather tools, news and Prayer
Offering free tools for blogs and Web sites – weather tools, news and Prayer.
freeeeeeeeee
The white iphone 4 hardware design hasn’t changed from the one we already knew about. It uses the same materials as the prototype: Black glass and stainless steel rim.
in this autumn there’s already got white iphone 4 vfdkgfodkgofdkgkd
this topic was looking for a long time. thank you
I just mentioned is a good topic. It was looking for a long time
There are good articles on your site. I follow with interest
fulya arçelik beyaz esya servisi
panasonic klima bakim ve ariza servisi
Well i like these custom write panels in wordpress. I will surely try this in my wordpress blog. Thanks for sharing valuable information.
Nice post. Great stuff mate, Ive been searching for a good alternative to ‘Custom Field Template’ plugin for hours.
very similar to an older post i’ve seen, but i guess it’s an update or something.
Wonderful post related to creating custom panels. Lovely designs.
SEO India
great post related to creating custom panels. Lovely designs.
SEO India
freeeeeeeeeeee weblogs
istanbul lg klima bak?m ve ar?za servisi
nlp kimya yag cozucu ürünleri
seo uyumlu tan?t?m yaz?s?
volkswagen grubu teknik servisi
really good post guys thanks.
really good writing tools.
thank goog really
sitenizin içeri?i çok güzel te?ekkürler
I thought this article very good, If not this article. I do not know where to find information. Thank you very much. I will always follow your articles.
Thanks for posting this…it was just what I needed for a current project
very good idea. thanks for sharing this useful info.
I think the audio business these days
I found your blog in a new directory of blogs
Your blog looks good, have a nice day.
I don’t know how your blog came up, must have been a typo
I congratulate you for your site and content
thanks admins.good perfect site 9-1-2011_9_9_32
good perfect site 9-1-2011_10_3_44
en guzel yerli yabanci film ve dizileri izleyeceginiz tek site filmizlefull.net 9-1-2011_13_59_26
thanks thank
Once again a great job….Always very informative and well thought out. Look forward to the next one!Your advice is very useful.
facebook app developer
Thank you
özel sirketler sirket gruplar? icin 10-1-2011_1_41_34
Yeni aç?lan portal sitemize sirincafe.net den ula?abilirsiniz. Verry good sites, in sirincafe.net.
11-1-2011_7_3_44
Thank admin
Thanks so much on this useful information. It’s very helpful.
kabe canl? baglan, kabe canl? yay?n ve kabe izle 11-1-2011_9_41_52
I did not notice
(
Porno izle, porno, full porn, sikis, sikis izle
12-1-2011_19_18_39
Turkish
Thanks admin
porn, porno, sex ve sikis izleyeceginiz 1 numaral? site 12-1-2011_23_21_30
Your blog looks good, have a nice day.
I don’t know how your blog came up, must have been a typo
Your blog looks good
I found your site thank you
Well i like these custom write panels in wordpress. I will surely try this in my wordpress blog. Thanks for sharing valuable information.
yemek tarifleri , yemek tarifi , kolay yemek tarifleri 17-1-2011_20_14_20
lemonshare thank for taste
porno ve siki? film leri ile dolu harika bir sex sitesi 19-1-2011_20_54_52
Thanks so much on this useful information.
Your blog looks good, have a nice day.
Fatal error: Cannot redeclare create_meta_box() (previously declared in C:\wamp\www\wordpress\wp-content\themes\mydesign3\functions.php:57) in C:\wamp\www\wordpress\wp-content\themes\mydesign3\functions.php on line 1301
hi friends i m encountering this error plz help where to add this code.. i added in functions.php
goood…like…tahnks..very helpfuull
webmaster martina jack
Flutter does look pretty cool! But the script above is great for clients who you don’t want to have to create their own fields, or don’t know how. This lets you control which fields are on the posts, and what keys to use, when you develop the theme.
Thanks so much on this useful information. It’s very helpful.
I really like the way it appears in the backend, however I feel Flutter is just a little bit easier to understand and use. It combines all of these features and adds a tad bit more. Good post though!
Thanks so much on this useful information.
I always want to create more creativenesses in my all designs. I really appreciate your design indeed. Very inspirational. People have to be more creative and innovative to explain their particular designs. Keep it up
Thanks for this code, it is very helpful.
Thanks for this code, it is very helpful. My juegos de bob esponja site will feel great with your advices
http://www.juegosdebobesponjas.com
Thanks for this code, it is very helpful. My juegos de bob esponja site will feel great with your advices
Juegos de Bob Esponja
Great we will be using this on our next project, lol at the comments.
Find out how to write a successful rainforest coursework.
[...] Now you are probably wondering how did we create this write panel? Well, Spencer over at WeFunction has written an amazing tutorial that walks you step by step to creating a custom write panel for [...]
Thanks so much on this useful information.
Very nice, thank you
Good Me Sory!
Good sory You Me
Thanks Me see You
Thabks Me See Very
Good See Very Heard
Very Much See Thanks Good
Good Se you Me
Thanks Me See You Very
I really appreciate your design indeed. Very inspirational.
Thabks Me See Very
This was something that I was finding since many days. Finally got the code. Thanks for sharing such a helpful post.
It’s really a very good article,I learn so much thing from it,thanks.You are really a nice person.
Much!like your site and your comments. Comment too perfect. I recommend your site to buddylist. wep here to enjoy the site as a quote to write reviews of your site. I hope to publish an excerpt with your signature that does not mind. thank you admin 25-2-2011_3_21_41
I look forward to more similar posts that are simple to understand. I have read many entries across blogs that speak to the audience as if we already know about social media, though many of us are grappling to understand what it really is. Juegos de Cocina
I’ve been looking for this as I’ve been customizing my personal blog, thanks
I do not like to die. I really enjoyed this site. issues is remarkable and beautiful. Many thanks to everyone for sharing. exactly what issues there.
very practical. Thanks a lot.
I really appreciate your design indeed
it is revelation to me , thanks a lopt
Hey,
Thanks for the amazing code, that helped a lot.
But I have one question If you have time.
I using your code to create fields for custom post types, and I want to create a different set of fields for another post type.
so I tried to modify your code to make the other set of fields but I failed.
could you please give an example about that?
Thanks,
OK … So it worked fine now.
I had to rename the functions.
thank you for providing informative article to read
Thanks for share your nice information…
Christmas is about to crash upon the shore of your life like the giant rogue wave, and you have not yet completed your list
Sosyetenin zay?flama s?rr? olarak gündeme gelen Alt?n Çilek dünyan?n lif oran? en yüksek meyvesidir. En yak?n rakibinden 3,5 kat daha fazla lif içeren yap?s? onu dünya zay?flama sektörünün gözdesi yapm??t?r. Bu lifli özelli?i sayesinde net bir tokluk hissi sa?lamakla birlikte en önemli özelli?i vücuttan su kaybetmeden, kaslar? de?il ya?lar? hedef alarak k?sa zamanda yüksek ve sürekli kilo kayb? sa?lamas?d?r
altin çilek
you have not yet completed your list
But you are trapped
Very good article! thank you to the author for it! In it interesting and useful information it is possible often times re-read it! I will advise to read it all friends. It will be very useful at writing of the article . Very much thankful you.
http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/
very nice this blog thanks admin
Flutter does look pretty cool! But the script above is great for clients who you don’t want to have to create their own fields, or don’t know how. This lets you control which fields are on the posts, and what keys to use, when you develop the theme.
Thanks for writing about this. I’ve been using Flutter, but it makes me nervous every time an upgrade of WordPress comes out. I’ll try using your code on a future project.
Nice blog about creating custom panels. Thanks
thank you for providing informative article to read
Very nice, thank you
cam mozaik, Mermer, Do?al Ta? Kaplama, Ta? ??leme, Mimari Oyma, Sütun, ?ç ve D?? Kaplama, Mekan Tasar?m?, Oymac?l?k, Dekorasyon, Artstone, Natural Stone 18-3-2011_12_36_39
Well done, thanks a lot.
Offering free tools for blogs and Web sites – weather tools, news and Prayer
güzel b? konu
oldu olmas? gerekne
en iyisi
of kafa of kafa
very useful information i like this blog
Very useful indeed. I am looking for this kind of tutorial. Custom write panels was a pain in the a**. But now it is quite easy anyway. Good one thanks for sharing!
Quite hard to follow. Lots of coding and unexplained lines of code. However, i’ll try to understand it. It may be useful for my next project. Thanks.