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.









