Difference between revisions of "Wordpress"

From WolfTech
Jump to navigation Jump to search
m
 
 
Line 1: Line 1:
 
Eric will write content.
 
Eric will write content.
 +
 +
 +
== Adding custom post types with the Magic Fields plugin==
 +
In order to add a custom post type (e.g. projects) to a Wordpress application, follow these steps:
 +
 +
#Install the Magic Fields Plugin. Be sure to use version 2. [http://magicfields.org/ Magic Fields Site]
 +
#Using the plugin, create the desired post type with appropriate settings.
 +
#For the post type, edit the post type and add custom fields as needed (for example, with a projects type you would need an abstract field, a conclusions field, and an acknowledgements field).
 +
#Add the template for the newly-created type.
 +
#*If you are able to add files to the site, add a new template file specifically for the type. This is preferable.
 +
#*If you are not able to create new files, simply edit the template page that the type defaults to (e.g. singl-post.php) to display different content depending on the post type. This is a bit messier and is nice if it can be avoided.
 +
#*Note that the editing of these files is theme-specific, and needs to be re-done if the theme is changed. This is one of the reasons that it is preferable to create an entirely new template instead of modifying and existing one.

Latest revision as of 15:20, 17 November 2011

Eric will write content.


Adding custom post types with the Magic Fields plugin

In order to add a custom post type (e.g. projects) to a Wordpress application, follow these steps:

  1. Install the Magic Fields Plugin. Be sure to use version 2. Magic Fields Site
  2. Using the plugin, create the desired post type with appropriate settings.
  3. For the post type, edit the post type and add custom fields as needed (for example, with a projects type you would need an abstract field, a conclusions field, and an acknowledgements field).
  4. Add the template for the newly-created type.
    • If you are able to add files to the site, add a new template file specifically for the type. This is preferable.
    • If you are not able to create new files, simply edit the template page that the type defaults to (e.g. singl-post.php) to display different content depending on the post type. This is a bit messier and is nice if it can be avoided.
    • Note that the editing of these files is theme-specific, and needs to be re-done if the theme is changed. This is one of the reasons that it is preferable to create an entirely new template instead of modifying and existing one.