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 working under wordpress the last year.


terryteo
21 Feb, 2010
@Dan
the solution to your problem is simple.
http://wordpress.org/extend/plugins/idealien-category-enhancements/
Dan
22 Feb, 2010
@tom – thanks a bunch. I think that might just be what I am looking for. I will give it a go.
@terry – thanks for the plugin link.
zestylemon
6 Mar, 2010
I’d really appreciate it if someone could tell me what code snippet I use to display the contents of a Dropdown List.
In the article one of the sections is ‘Dropdown List’ but the content immediately below it is for ‘Checkbox List’.