Custom fields are awsome, they can be anything you like, you can show your mood, or store a file location, or whatever you can imagine. Their only limit is that you have to know the post ID, so if your using templates you can mostly only use them inside the loop. This function allows you to use a pages/posts custom fields outside of the loop, e.g. in the header.php file allowing you to control the layout of a page before the loop has even run.
- Activate the plugin through the ‘Plugins’ menu in WordPress
- In your template file add
<?php get_my_custom('your-custom-field-name', TRUE); ?>.
its all pretty simple.