I am using WP Courseware (www.flyplugins.com) for a client's site and my basic understanding is that the course units are basically a custom post type ('course_units'). The course units can be created directly or converted from posts.

WP Courseware does not support category or tags taxonomy out of the box and it had to be enabled.

All of that was said to say that when I have posts tagged that they show up when you call http://domain.com/tag/design/ however the course units tagged with "design" do not show up. I have never bothered with tags enough to care about tag clouds, etc so I do not know what file, template or function that needs to be updated to support the custom post type of "course_units" when it displays posts containing tags.

I followed the advice found here: Combining tags from post types

register_taxonomy_for_object_type( 'post_tag', 'portfolio' );

And now I see Tags under my Course Units in WP Dashboard. I click on Tags and see the tags and click on the count and it shows the course units that tagged correctly in the backend, so I just need to know how to enable support on Tag Cloud for the front end where it actually returns the course unit posts instead of "Sorry, no content matched your criteria."

What connection am I missing?

  • I am not looking to add query variables to the URL. I need to know why, when the tags are associated with the custom posts in the backend, that there is no association with the tag cloud on the front end. Commented Feb 5, 2015 at 18:57
  • I reviewed the solution in the referenced post and it doesn't change the output. function post_type_tags_fix($request) { if ( isset($request['tag']) && !isset($request['post_type']) ) $request['post_type'] = 'course_unit'; return $request; } add_filter('request', 'post_type_tags_fix'); I still get no results found Commented Feb 5, 2015 at 18:59
  • Query vars are always present, regardless of whether or not they're immediately visible in a URL - you can safely ignore that part of the linked question. The problem is that the front-end's default behavior for tag archives is to query only the 'post' post type. You need it to query either 'any' or ['post','course_unit'].
    – bosco
    Commented Feb 5, 2015 at 19:07
  • Just to be clear - what is the course post type? In your description you list it as 'course_units', however you reference it in the comments as 'course_unit' - that one 's' can make a world of difference ;)
    – bosco
    Commented Feb 5, 2015 at 19:10
  • 1
    you can also do that via the pre_get_posts action like in this answer. change is_category() to is_tag().
    – Milo
    Commented Feb 5, 2015 at 19:41