Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I identify empty topic tags?

Viewing 7 replies - 1 through 7 (of 7 total)

  • Chuckie
    Participant

    @ajtruckle

    Appreciate any guidance on this.


    Robin W
    Moderator

    @robin-w

    what summary panel?


    Chuckie
    Participant

    @ajtruckle

    Please look here and you will see a widget:

    Theocratic Software

    It is the “bbPress Forum Statistics” widget.


    Robin W
    Moderator

    @robin-w

    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


    Chuckie
    Participant

    @ajtruckle

    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


    Chuckie
    Participant

    @ajtruckle

    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

    @wpturk

    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