Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I identify empty topic tags?

Viewing 7 replies - 1 through 7 (of 7 total)
  • @ajtruckle

    Participant

    Appreciate any guidance on this.

    @robin-w

    Moderator

    what summary panel?

    @ajtruckle

    Participant

    Please look here and you will see a widget:

    Theocratic Software

    It is the “bbPress Forum Statistics” widget.

    @robin-w

    Moderator

    this will display any topics which have no topic tags I think

    add_shortcode ('empty-tags' , 'rew_empty_tags' ) ;
    
    function rew_empty_tags () {
    	$args = array( 'post_type' => 'topic', 'posts_per_page' => -1 );
    	$loop = new WP_Query( $args );
    	$output = '' ;
    	while ( $loop->have_posts() ) : $loop->the_post();
    		$current_id = get_the_ID();
    		$topic_tags = bbp_get_topic_tag_names( $current_id );
    		if (empty ($topic_tags)) $output.= '<br>'.$current_id ;
    	endwhile;
    	
    	return $output ;
    }

    create a private page and put the shortcode

    [empty-tags] in it

    @ajtruckle

    Participant

    Interesting. When I try that it yields the following output:

    7415
    6447
    5612
    5386
    4601
    4466
    4182
    4027
    3754
    3753
    3614
    3542
    3372
    3368
    3189
    3101
    3061
    2508

    @ajtruckle

    Participant

    I think this is not the same thing. This is listing posts with no tags.

    The summary is reporting tags with no posts. So we must have two orphaned tags.

    @wpturk

    Participant

    I don’t know it this helps and I did not test it with bbpress.

    This plugin finds and deletes unused tags:

    Mass Delete Unused Tags

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar