• Resolved ki1022

    (@ki1022)


    I am trying to display multiple tag-groups on 1 page. The first one always displays fine but the formatting for any subsequent groups is broken.

    Here is a code sample of what I am trying to do:

    [tag_groups_cloud smallest=”16″ largest=”16″ show_tabs=”0″ hide_empty=”0″ include=”1″]

    [tag_groups_cloud smallest=”16″ largest=”16″ show_tabs=”0″ hide_empty=”0″ include=”2″]

    [tag_groups_cloud smallest=”16″ largest=”16″ show_tabs=”0″ hide_empty=”0″ include=”3″]

    So in the above code, the first tag-group works great, but the other don’t display properly. The text is there but they are missing the formatting similar to the first one.

    http://wordpress.org/plugins/tag-groups/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You need to use a different div_id=… parameter for each of the shortcodes that follow the first one.

    [tag_groups_cloud smallest="16" largest="16" show_tabs="0" hide_empty="0" include="1"]
    
    [tag_groups_cloud smallest="16" largest="16" show_tabs="0" hide_empty="0" include="2" div_id="second_tag_cloud"]
    
    [tag_groups_cloud smallest="16" largest="16" show_tabs="0" hide_empty="0" include="3" div_id="third_tag_cloud"]

    Thread Starter ki1022

    (@ki1022)

    Thanks for the super-fast reply, and that fixed it. Sorry if that was a dumb question, I am far from a WordPress expert!

    no problem, I’m glad that it helped

    Thread Starter ki1022

    (@ki1022)

    So now I am using the following code to display all tag groups in a separate list…

    $tag_group_labels = get_option( 'tag_group_labels', array() );
    		$tag_group_ids = get_option( 'tag_group_ids', array() );
    		$tag_group_taxonomy = get_option( 'tag_group_taxonomy', 'post_tag' );
    		$number_of_tag_groups = count($tag_group_labels) - 1;
    
    		for ($i = 1; $i <= $number_of_tag_groups; $i++) {
    		if ( function_exists( 'tag_groups_cloud' ) ) print_r( tag_groups_cloud( array( 'include' => $i, 'div_id' => "taggroup" . $i, 'hide_empty' => false ) ) );
    		}

    Is there any way I can perform this action but still somehow use the “sort order” property instead of it always being sorted by the ID number?

    It should be possible:

    $tag_group_ids = get_option( 'tag_group_ids', array() );
    foreach ($tag_group_ids as $i ) {
     if ($i>0) {
      if ( function_exists( 'tag_groups_cloud' ) ) echo ...
     }
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem displaying multiple tag groups with shortcode’ is closed to new replies.