Skip to main content

Custom Fields and Verve Meta Box Plugin

Ever wanted a better way to add custom fields? Wanted  to add really usable and good custom field meta box so that your client is happy? Well then Verve Meta Box plugin is your answer. It's very easy to use and best one out there for the purpose.


Verve Meta Boxes  allows for creation of text, textarea, image, file, date, time, datetime, select, radio, and checkbox custom fields for posts and/or pages.
A Meta Box added by the Plugin


Values for custom fields are stored in wp_postmeta and can be accessed in templates through standard WordPress functions such as: the_meta, get_post_meta, get_post_custom, get_post_custom_values, etc.
Once installed, it adds a configuration screen to your admin page which will be located under Tools in the left navigation. There you can create multiple meta boxes each with a set of user defined drag and drop sortable custom fields.
The Admin Panel added by the Plugin

Getting the values on to the template: 
Getting the values submitted in the custom field straight forward and easy. Just add this in you loop:
$place=get_post_custom_values('place');
echo $place[0];

Modify it to what name you have given for the custom field. And please do note that this will always be lowercase and if you have used any space, replace it with an underscore.


Have you used any other plugins that is better or what do you think of this plugin. Please do let us know using the comment form.

Comments

Popular posts from this blog

Add new avatars to your wordpress and Say Good-Bye to Mystery Man

If you are like most of the other wordpress developers out there, then you might also had this problem with the default mystery man in wordpress. You also would wanted to change the deafualt avatar of your comments with something nice. It's not that hard. It's infact very easy. Just add this to your functions.php file within your theme folder. /** * add a default-gravatar to options */ if ( !function_exists('fb_addgravatar') ) { function fb_addgravatar( $avatar_defaults ) { $myavatar = get_bloginfo('template_directory') . '/images/avatar.gif'; $avatar_defaults[$myavatar] = 'people'; $myavatar2 = get_bloginfo('template_directory') . '/images/myavatar.png'; $avatar_defaults[$myavatar2] = 'wpengineer.com'; return $avatar_defaults; } add_filter( 'avatar_defaults', 'fb_addgravatar' ); } Why this? When you can have this! Happy coding! For any queries or suggestions give a comment below!

Using WordPress Comment Meta

Comment meta is such a wonderful addition to WordPress that allow us to extend the native comment form with additional fields. This comes very handy for the one's who is trying to create review sites etc. Unfortunately there’s no documentation added on the WP codex. For the purpose of demonstration we will be doing: add a check box to the comments form. show in the WordPress comments admin whether or not the checkbox was selected. indicate in the comment notification email whether or not the checkbox was selected. Adding the checkbox to the comments form is easy. To add the checkbox to the comments form open up your themes comments.php file and paste this into the area where you need it: <label><input id="publishc" name="publishc" tabindex="90" type="checkbox" value="this is the value I want to capture" /> Whatever sentence that you want commenters to use the checkbox for</label> Now that the checkbox

Inserting post image programmatically to worpress

We have discussed how posts can be added programmatically before. This comes very much handy when you have to make custom scripts to import content from some cms especially custom ones. But the thing often missed is how to add post image for a particular post programmatically. This is something that is always missed. There very less resources online explaining this. But this is a very straight forward thing and very easy to do. There is this wonderful function that does this beautifully. media_sideload_image($url,$post_id,$description); The first argument is the remote url of the image you want to download. The second argument is the post id of the post to which you want to attach the image. The third argument is optional, but will be a description if included. I'd suggest finding a way to throttle the downloads so that you don't keep timing out, such as limiting the number of images it pulls in per load and setting the importer to refresh itself between dow