OrganizeWP Docs
2.0.4 · last updated June 2026
10 — Customizing
Smart Groups
Smart Groups are collections of entries that are processed and parsed in real time. One that ships with OrganizeWP is a list of recently edited entries:

Smart Groups are a great way to keep lists of entries that meet a certain criterion automatically up to date. Beyond the ones that ship with OrganizeWP, you can create your own to meet the specific needs of your site.
Create a custom Smart Group
Suppose your site values prompting conversation around your blog posts. Let’s create a Smart Group that lists posts with zero comments so you can put effort into surfacing them. The render() method is called each time OrganizeWP is viewed and is expected to output the Smart Group’s markup. The final step is to register it on the smart_groups filter:
<?php use Buildworks\OrganizeWP\SmartGroup; use Buildworks\OrganizeWP\Utils; /** * Lists the 5 most recent Posts that have no comments. */ class Posts_Without_Comments extends SmartGroup { public function __construct() { $this->name = 'posts_without_comments'; $this->label = __( 'Posts Without Comments', 'your-textdomain' ); } public function render() { $posts = get_posts( array( 'post_type' => 'post', 'posts_per_page' => 5, 'comment_count' => 0, ) ); if ( empty( $posts ) ) { echo '<p class="description">' . esc_html__( 'No posts without comments.', 'your-textdomain' ) . '</p>'; return; } echo '<ul>'; foreach ( $posts as $post ) { printf( '<li><a href="%s">%s</a></li>', esc_url( Utils::get_edit_post_link( $post->ID ) ), esc_html( $post->post_title ) ); } echo '</ul>'; } } // Tell OrganizeWP to register the custom Smart Group. add_filter( 'buildworks/organizewp/smart_groups', function ( $smart_groups ) { $smart_groups[] = new Posts_Without_Comments(); return $smart_groups; } );
