Title: pg_Replies_Widget missing &#8220;after_widget&#8221; when $allowed_posts is empty
Last modified: July 25, 2017

---

# pg_Replies_Widget missing “after_widget” when $allowed_posts is empty

 *  Resolved [actionscripted](https://wordpress.org/support/users/actionscripted/)
 * (@actionscripted)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/pg_replies_widget-missing-after_widget-when-allowed_posts-is-empty/)
 * _Sorry to keep being the annoying markup poster…_
 * pg_Replies_Widget doesn’t output the “after_widget” markup when there aren’t 
   posts to show. If the site widgets are configured to use before/after widget 
   markup — for example an opening/closing div — the final closing tag won’t be 
   there.
 * One way to fix this is to add an echo on line 645 right after the closing list
   tags and before the return in pg_forum_widgets.php:
 *     ```
       if ( empty( $allowed_posts )) {
       	echo '<ul><li>' ;
       	_e('No Replies', 'bbp-private-groups') ;
       	echo '</li></ul>' ;
       	echo $args['after_widget'];
       	return ;
       }
       ```
   
    -  This topic was modified 8 years, 10 months ago by [actionscripted](https://wordpress.org/support/users/actionscripted/).
    -  This topic was modified 8 years, 10 months ago by [actionscripted](https://wordpress.org/support/users/actionscripted/).
      Reason: Code formatting/cleanup

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

 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/pg_replies_widget-missing-after_widget-when-allowed_posts-is-empty/#post-9350678)
 * I like an annoying markup poster
 * The only way the plugin gets improved is by feedback – I’ll take a look at it
   shortly
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/pg_replies_widget-missing-after_widget-when-allowed_posts-is-empty/#post-9351138)
 * just released 3.5.6 – now has this !!
 *  Thread Starter [actionscripted](https://wordpress.org/support/users/actionscripted/)
 * (@actionscripted)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/pg_replies_widget-missing-after_widget-when-allowed_posts-is-empty/#post-9353539)
 * Awesome Robin, thanks so much!
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/pg_replies_widget-missing-after_widget-when-allowed_posts-is-empty/#post-9353613)
 * no problem and thank you for improving the plugin !!

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

The topic ‘pg_Replies_Widget missing “after_widget” when $allowed_posts is empty’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bbp-private-groups.svg)
 * [Private groups](https://wordpress.org/plugins/bbp-private-groups/)
 * [Support Threads](https://wordpress.org/support/plugin/bbp-private-groups/)
 * [Active Topics](https://wordpress.org/support/plugin/bbp-private-groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bbp-private-groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bbp-private-groups/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Robin W](https://wordpress.org/support/users/robin-w/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/pg_replies_widget-missing-after_widget-when-allowed_posts-is-empty/#post-9353613)
 * Status: resolved