Wordpress

From WolfTech
Revision as of 14:20, 17 November 2011 by Jeander4 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.