This tutorial will be explain the basic use of Magic Fields, how create write panels, how create custom fields and how print in the template.
Installing Magic Fields.
Magic Fields is installed as any wordpress plugin, you just need download from his download page, put the folder in:
And in the admin area in the plugins section do click in the “activate” link and its all.
When you active the plugin the first thing to Magic Field ask is for create two folders, this folders are:
Is enough to you create these folders and give them enough permissions for be writable by Magic Fields
Now we are on road for start to use Magic Fields!
The best way to understand how Magic Fields Works is with a example, in this example i want create a portfolio of my work. So, the first thing to do is a create a category called “portfolio” and after that create our write panel and assigned the category “portfolio”
In the write panel page exists many options, this options will be explained more a detail in the future for now i just leave the options by default.
After to create the write panel I’m going to add custom fields for this write panel, for now I will create just one custom field for add the services to I gave to the client.
In this page I can choice what type of custom field I want in this case I want a textbox field, and I give the name of “services” and the Label of Services.
I don’t want to this field be required and I don’t want to this field can be duplicated. (the duplicate featured will be explain in detail in the next’s posts)
And it’s all now we can enter to the portfolio panel and now we can start to create content.
We can view our post created with our write panel in the “Manage” option.
Displaying our information in the template.
Well now we need display the information to be added in our template, for that Magic Fields give us a little api for this. Lets go.
In our single.php file we can add this:
And it’s all.
Now if we visit the post we will see the information to we put in the services field.
Exists many more things to we can do with Magic Fields, in the next’s posts I will talk about the differents types of fields.
UPDATE: For more information about Magic fields visit the wiki