This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Result Templating

#26770
jmjones328650jmjones328650
Participant

Awesome!

I just tweaked it a little and the end result returns the category ID – which is fine enough for me to set my style according to the post’s category. For the benefit of everyone else who may require the same for their project, the code I used was:

<?php echo $r->content_type == 'pagepost' ? '' . implode('', wp_get_post_categories($r->id, array( 'name' => $cat->name, 'slug' => $cat->slug ))) : ''; ?>

Thanks again Ernest!