Support » Plugin: Cool Tag Cloud » How to display exclusively Custom post type associated tags

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author WPKube

    (@wpkube)

    Is the custom post type using the same tags as the regular posts do? Or is it a custom taxonomy ( that behaves like tags )?

    Thanks for the quick reply…
    Custom Post types uses same tags as of regular post… Actually this is utilized to use common Tags across website… Also mine is a wp multisite platform… where Cool Tag Cloud plugin is activated on single website (not site wide).

    Seems the widget function “display tags from post only” is not working and it is displaying all possible Tags.

    Plugin Author WPKube

    (@wpkube)

    On line 65 you’ll see:

    if ( $l_tag_params['on_single_display'] == 'local' && is_singular( array( 'post', 'page' ) ) ) {

    Change that to:

    if ( $l_tag_params['on_single_display'] == 'local' && is_singular() ) {

    That way it’s not limited to only posts and pages, will work on custom post types as well.

    I found this thread while searching for a way to include tags attached to the post type “link_library_links” as created by Yannick LeFebrve’s “Link Library” plugin.

    The wp_posts:post_type value comparable to page or post is “link_library_links” and the wp_term_taxonomy:taxonomy value for the term is “link_library_tags” compared with “post_tag” for legacy posts.

    Hopefully, a little PHP will combined them, but it’s beyond my skill level with PHP to figure out what should work.

    TIA.
    Dave
    San Antonio, Texas

    Plugin Author WPKube

    (@wpkube)

    Hi,

    On line 69 is this:

    $l_tag_cloud_text = wp_tag_cloud( $l_tag_params );

    Just before that you would put this:

    $l_tag_params['taxonomy'] = 'link_library_tags';

    YES! That produces a list of ONLY the Link Library tags!!!

    I assume it would have to be an array if you wanted BOTH ‘link_library_tags’ and ‘post_tag’?

    THANKS for the quick response!!!

    Plugin Author WPKube

    (@wpkube)

    Hi,

    You’re welcome.

    Correct, you can use an array for multiple taxonomies.

    So would the code look something like:
    $l_tag_params['taxonomy'] = array('link_library_tags', 'post_tag');

    TIA.
    d.

    Plugin Author WPKube

    (@wpkube)

    Yes, that’s correct.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to display exclusively Custom post type associated tags’ is closed to new replies.