Use Custom Fields with WordPress?

Do you ever use custom fields with your posts and have trouble getting them to display? Well here’s a quite little line of code to add into the post loop to get them to display.

[html]<?php echo get_post_meta($post->ID, ‘custom field name here’, true); ?>[/html]

It really is that simple!!

4 thoughts on “Use Custom Fields with WordPress?”

  1. Hi AJ. It may be simple in wordpress, but how do I get them to work in Headway? I’ve been trying for a over a week, as a newbie user of Headway to get an idea of incorporating custom fields into the Headway Theme, and particularly how to use the Advanced Custom Fields plugin. I thought I’d try Headway for a new client site and as its a learning curve, some aspects are proving problematic.

    Any help appreciated with what appears a fantastic tool.

    Thanks – Gavin.

    • Add a custom code block inside the Visual Editor in the wrapper you wish, and add that line of code. Make sure you replace the first argument with whatever you called your custom field.

Comments are closed.