I am a PHP hack, but slowly trying to not be one.
- Page template for “Artists”
- Custom Field Name: “art_cat”
- Custom Field Value that matches Category of same name/syntax
- Able to call in that value via the following:
<?php $artistcategorygetter = get_post_meta($post->ID, 'art_cat', true); if ($artistcategorygetter) ?> <?php echo $artistcategorygetter; ?>
Hoping to figure out how to use WP_Query or other method to pull in recent posts from said category.
I have been all over the forums and Google for 10+ hours now and am unable to find a solution that fits. Starting to understand PHP a bit more as a result, but this seems like a very simple thing to do and I am either missing something or the solution is far too over my head.
- The topic ‘Using Custom Field To Show 5 Posts of Category’ is closed to new replies.