Types of Custom Fields.
In Magic Fields, there are 12 types of “fields”. Below is a detailed explanation of each “field” and how to use them in WordPress.
Please note that the code used to display each “MagicField” must be inside one of the WordPress loops. E.g. In the default theme, “the_content();” is displayed within the “single.php” file – please see the image below:
Textbox.
Usage:
Return: String.
Multiline.
For this field, the same filters used for “the_content();” may be applied using “shortcode“. Please see the images below:
Usage:
Return: String.
Checkbox.
Usage:
if($value){ /*Something*/ }
Return: Bool.
Checkbox List
Usage :
foreach($my_list as $element){
echo $element;
}
Return: Array
DropDown List
Usage:
echo $my_option;
Return: String
ListBox
Usage:
foreach($my_list as $element){
echo $element;
}
Return: Array
Images
Usage:
/**
* With this method is returned the absolute url
* of the image
**/
get_image(‘field_name’);
/**is returned the image tag of html**/
Return: String
Date
Usage:
Return: String. (Return the date in the same format to was selected when was created the custom field, actually exists 8 differents formats of dates)
Audio
Usage:
/**
* With this method return
* the absolute url of the image
**/
echo get_audio(‘field_name’);
/**
*With this method return a flash player
* for the user can ear the song
**/
Color Picker
Usage:
Return : String (hexadecimal number of the Color )
Slider
Usage:
Return: String.









Gnuget (David V) is a Web developer since 2002 and nowadays working at



Pete
17 Oct, 2009
would the [gallery] short code work?
jan
22 Oct, 2009
Hey guys, I have the same trouble in flutter and magicfields: all breaks in the multinine textfield disappear if I switch between html and visual. with some users they also disappear without switching. any idea? greets!
dobleclic
24 Oct, 2009
Hi,
Great plugin!
I want to add a title for a custom field, and I need to hide this title if the custom file is empty.
How can I do that?
Thanks!
hunk
26 Oct, 2009
hi jan we will review multiline.
hi doblelick. this that you want to do is template? if it is thus, you can use something like
< ?php
if(get('name_field')){
//code
}else{
// more code
}
?>
isni
3 Nov, 2009
hi hunk.. great plugins.. tq for your time..
but i have a problem..
i make an image custom field, but i cant delete it (using delete text under the thumbnail ini editing page). is it a bugs? or only mine? tq for your answer
Gnuget
3 Nov, 2009
Hi isni,
What problem you have when you are deleting the image? when you do click in the image this is not deleted or when you deleted the imagen after to refresh the page the image appear again?
Diaan
25 Nov, 2009
Hi
There is still no guide for how to deal with file uploads, neither does there seem to be a function for getting files.
I have also tried to simply use get(‘field_name’) but that returns nothing.
hunk
25 Nov, 2009
Hi Diaan http://wiki.magicfields.org/doku.php?id=es:type_of_custom_fields#file
terryteo
4 Dec, 2009
first of all, great news that flutter is rising from the ashes. ill be following this development eagerly.
with regards to nr above, returing duplicate groups or duplicate fields has always been flawed in flutter, because when you delete a duplicate then add another duplicate it throws the whole order out.
there is a good fix by thang and nick keenan on this page.
http://groups.google.com/group/flutter-support/browse_thread/thread/904038d01c85ac8c/fa0acab9c99504ae?lnk=gst&q=i%2B%2B#fa0acab9c99504ae
Roy
12 Jan, 2010
How come the anchor buttons don’t work in the multiline editor?
Roy
12 Jan, 2010
Nevermind guys, I messed up.
Keep up the good work!!
Lenner
27 Jan, 2010
Hi Guys, great plug, image upload actually works unlike flutter. Still can’t get api for file upload to work. Hunk’s wiki link says it’s just get(‘pdfupload’) but I get this “http://localhost/www/burnt%20pine%20weddings/wp/wp-content/files_mf/file.pdf”, the actualy path, I need a link to the file.
I also tried get_file(‘pdfupload’) but no luck, can someone please clear this up, as this is vital info. thanks
jason
31 Jan, 2010
Good to see some further development of flutter.
Feature requests:
image associated with checkbox
google maps field
youtube field
xml export or integration with feed wrangler
Jeff Arnold
1 Feb, 2010
Hi,
Sorry if this is a dumb question. I need a list option, either list box, check box, drop down. Its not important. Which only permits 1 selection. Is that possible ?
i.e. if pretend its a list of measurements. if they select gram. Then Kg or litre cannot also be selected.
Many Thanks
Jeff Arnold
1 Feb, 2010
Hi
Again sorry for another dumb question. Is it possible to remove the default Upload / Insert Box WordPress gives. All of the fields are specified as your fields. I do not want the default. Is this possible.
Many Thanks for any help.
emma
4 Feb, 2010
Hiya
Thanks for this great great plugin! It’s very helpful. I’m wondering though, how do I add an alt tag to my images?
Thanks
tom
5 Feb, 2010
@emma use alt=”
Thanks for this plug-in, just spent all day struggling with flutter then found this!!
Should note on this guide not to copy and paste as get_image(‘field_name’); should be get_image(‘field_name’);
devdarsh
5 Feb, 2010
Currently i am using is amazing plugin. Why draft posts are not showing in manage section of respective custom write panel?
While i do a draft using any write panel, it doesn’t show in respective custom write panel manage tab. I can only see that in default edit posts page.
emma
6 Feb, 2010
Oh, sorry for a silly question, found it at the forum
http://groups.google.com/group/magic-fields/browse_thread/thread/124b248a61591129/5008b1d890144231?lnk=gst&q=alt#5008b1d890144231
Markgt
14 Feb, 2010
Hi there
ive got a question about the Checkbox list – i got it to echo all the options in the page template, but HOW do i echo ONLY the ones that have been ticked??
any help would be appreciated. thanks!