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:
wp-content/plugins
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:
/wp-content/files-mf /
and
/wp-content/plugins/Magic-Fields/thirdparty/phpthumb/cache
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!
Basic Usage
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









Hi kineta, to remove the div is necessary to disable EIP (settings-> Magic fields) or using the get and set the EIP parameter to false
http://wiki.magicfields.org/doku.php?id=front-end_functions#get
Hi Kineta,
One more question. I’m not able to get the assigned categories to work. It defaults to uncategorized. Not a big deal, but it would be nice to get it to work.
which browser?
The assigned category isn’t working for me in either Chrome and IE 8.
Thanks for your help. This really is a very useful and well made plugin.
Oh, ps – re the category problem. I’m using WordPress Beta 3.0 – perhaps that’s the problem?
[...] de publicación especializada sobre WordPress. Los interesados harán bien en estudiar el manual de uso básico, el manual sobre tipos de campos personalizados y, sobre todo, la completísima documentación del [...]
Hi — I also am looking for the same thing as Mike H: a way to have the additional multi-line fields use TinyMCE Advanced. I don’t like the default one and would like the editors to be consistent.
Love the plugin, though! Thanks.
Kineta, did you ever find the solution for the default category issue? we are having the same problem..
Hi, Thanks for the plug-in, I am however having some issues lol.
I am new to wordpress and want to add multiple fields to a page which can be updated ongoing. I believe I have done it right but its not working so I guess I did something wrong.
Where in the single.php file do I place the [echo get('services');] code?
Is it just in this one php file that I put the code?
and finally, it the single.php file in the theme directory of the main WordPress directory?
Thank you again!
D
hi David
1.- yes
2.- no, in all files you want to show the field
3.- no, the main is index.php
To daddydesign – no unfortunately, I’m still having the problem that my category settings are being ignored or overridden and defaulting to ‘uncategorized’. It would be a nice feature to have work, as my contributors regularly forget to assign a category. But that doesn’t overshadow the usefulness of this great plugin, imo.
Hi kineta in the next version (1.4) I have rewritten this part
I have entered an image .. but only the URL shows up .. I have looks through this … I know it’s an easy fix .. I just am not a php guy .. any help ??
Ps .. Love the Plugin !!
Hi Micheal use get_image(‘name_of_field’);
Is there a way to include a lightbox2 gallery in here .. with little thumbnails .. ?? Also .. when I use get_image(‘name_of_field’); it doesnt work .. maybe I am stupid .. I am using and this seems to work for me .. Can you be specific as I think my brain is really small .. Thanks ..
.. ps is blocked out my code that I put in the above post …
Hi Micheal read this http://groups.google.com/group/magic-fields/browse_thread/thread/8ab91605e28b807d/db2ab9c328ccd3b0?lnk=gst&q=lightbox#db2ab9c328ccd3b0
Just updated to the new version and noticed that the category problem is fixed! Thank you so much for this wonderful plugin. It’s so useful!
[...] esa mejora. La extensión no sólo destaca por su sobresaliente funcionalidad, sino por una excelente documentación (de hecho, existe un completísimo wiki en español sobre su uso), y en mi opinión constituirá [...]
Guys, you rock!
Thanks for the most handy cms plugin.
Great plugin, having one difficulty – I can only get one of my write fields when using the ‘get’ command
<?php
echo get("wp_page_title"); // Content does NOT appear
echo get("wp_page_content"); //Content does appear
?>
Both fields are setup exactly the same as text fields etc, the code is in my page.php
any suggestions? Thanks.