WordPress Plugin – Display Custom Fields
One of the intended use of this plugin is to provide just in time code without editing the theme. Often code, especially css, gets lost with theme change. This techniques will ensure the values are loaded only on the given page and they will survive changes of themes and other plugins.
You may use the plugin in two ways:
or optionally you can define the type of the field value. By default the type is “raw”.
[dcf field=”name_of_custom_field” type=”value_type”]
The accepted value types are:
“raw” – this is the default and you do not need to specify this type. It outputs the value as it is. You can use html code in the values quite safely.
“css” – use this to specify css code in the value of the custom field.
“cssf” – You may need to include a css file. The value of the custom field should be a fully qualified css file url. Here I would like to note that:
– It is highly unusual to include css files in the body. However, it does work.
– There may be a side effect that some elements may not show properly until the css file is completely loaded.