|
SimpleLog wiki
Installing SimpleLog Upgrading Working with themes
How to
Troubleshooting Development & resources |
Howto /
UsingCustomFieldsCustom fields are an easy way to assign additional information to posts. In preferences, in the content tab, you'll find three custom field options. To use a custom field, enable it and then give it a name. Note that you can rename or disable fields at any time without losing data. Once you enable a field, it will be available to you whenever creating or editing a post. You can enter data into it or not for each post. To use the value of a custom field in your theme, you'll use the data by referencing For example, if you create a custom field called "Type" and in various posts you enter values like "fiction", "bio", etc, you could use these in your views to show specific elements depending on the "Type":
<% if post.custom_field_1 == 'fiction' -%>
This is fiction!
<% end -%>
|