How often do you filter pages using categories, tags and so forth, but what if this isn’t enough? Enter custom fields. We’ve all used custom fields to add images or special little bits to posts, but what about using them for displaying posts with similar custom field values?
Check this code out..
<?php query_posts(’meta_key=car&meta_value=ford’); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
It’s honestly as simple as that. “car” refers to the custom field key and “ford” refers to the value.
It’s as simple as that!
Useful? Definitely!