Smart Groups

Smart Groups are collections of entries that are processed and parsed in real time. One of the Smart Groups that ships with OrganizeWP is a list of Recently Edited entries:

Smart Groups are a fantastic way to have lists of entries that meet a certain criteria automatically up to date in real time.

In addition to the Smart Groups that ship with OrganizeWP, it’s possible to create your own Smart Groups that meet the specific needs of your site!

Create a Custom Smart Group

Let’s say your site puts a high value on prompting conversations surrounding your Blog Posts. Let’s create a Smart Group that lists out Posts that have zero comments, which would allow you to put effort into exposing those Posts a bit more.

Building out the Smart Group looks like this:

The render() method of our custom Smart Group class will be called each time you view OrganizeWP. It expects that the markup for the Smart Group is generated and output.

The last step is to tell OrganizeWP to use our custom Smart Group:

With both snippets in place, our custom Smart Group will list out the 5 most recent Posts with no Comments:

Screenshot of custom Smart Group in OrganizeWP