Add category information beneath post?

The simplest solution would be a simple filter on the_content: function my_affiliates_descr($content) { if (is_single() && has_category(‘affiliate’)) { $content .= ‘This is an affiliate post’; } return $content; } add_filter(‘the_content’,’my_affiliates_descr’); You could combine that with category_description() as suggested in a comment to the question to get: function my_affiliates_descr($content) { if (is_single() && has_category(‘affiliate’)) { $content … Read more

Querying multiple categories in the WP loop if one of the category IDs is dynamically obtained

So, I think I’ve got it figured out… …get_cat_ID didn’t seem to be the correct function. I swapped it out with get_category_by_slug and that eventually got it up and running. //LINK IN BLOG POSTS THAT MATCH CHAPTER SLUG function chapter_posts() { //Get Group Slug $postCategory = bp_get_current_group_slug(); //Get posts global $post; $chapterCatID = get_category_by_slug($postCategory)->term_id; $args … Read more