Theme Extras -custom fields

request a themeThese are some nice things to have in a theme to make it easier to organize your site and present additional dynamic content. Without going into plugins, these are some ideas of additional features that can be worked into a theme using custom fields, basic WordPress functionality. Because using custom fields for these items requires some theme setup/alterations, I thought I’d include them in this series so that you can consider additional elements before having a theme designed.

Navigation Groups using custom fields

Navigation groups are a nice thing to have in a WordPress theme so that you can easily assign pages to be links in one or more navigation areas. For example, you may have a main tabbed navigation area just below your header, smaller navigation links in your footer, and a few additional links in the very top right corner of your site. This can be done using custom fields when writing/editing a page as long as your theme has some defined. Using our example, we would set up a theme that lists all pages with a custom field name ‘top-nav’ in the upper right corner. Pages with a custom field value ‘main-nav’ will appear in the tabbed navigation area. And pages with a custom field value ‘foot-nav’ will appear -where else- in the footer. This is nice because you can have a page listed in multiple areas by adding multiple custom fields. The order of your navigational links will be determined by the page order field when writing/editing a page.

Working with Us -navigation groups
Navigation groups are used in the themes we design -header and footer navigation areas are included by default, so be sure to describe any additional navigation areas you want in your theme request.

Post Icons using custom fields

Post icons (or thumbnails) that appear on index pages can be a nice touch. This is another feature that can be done using WordPress custom fields. This way you can use the built-in image uploader as usual, then if you want it in your post you can insert it like normal. If you just want it in the ‘preview’ on index pages, you would copy the ‘file URL’ in the uploader (close the uploader), and paste the URl into a new custom field as the ‘value’. For the matching custom field name you would enter what has been coded into the theme, such as ‘post-icon’. There are plugins that do something similar, but most of these just take the first image in your post and use it as the preview thumbnail. I’ve found that it’s nice to have post thumbnail capabilities built into the theme so that I don’t have to install additional plugins for this basic feature.

Dynamic Content using custom fields

There are tons of things you can do with custom fields to add some nice dynamic touches. For example, let’s say you want to have the ability to insert a custom message so that it appears pre-styled and positioned without having to type code into the text editor. Another job perfect for custom fields. Describe how where you want the additional content area positioned, and the style of your content area to a designer to have them code it as a conditional custom field. You might call the custom field something like ‘msg’ and then type your message into the corresponding ‘value’ field. Using custom fields this way means that your dynamic content will appear only if you decide to insert a custom message for that specific post or page. Similarly, you can use custom fields to prominently display changing status, like moods, music, that sort of thing. Anything that might be considered meta-information about posts/pages on a regular basis can be worked into your site so long as your WP theme has the custom fields defined.

You can leave a response, or pingback from your own site by linking to this article.

Leave a Reply