# Product groups/variations

Sometimes, it's necessary to categorize product outputs into distinct groups. For instance, when writing an article about a phone model, you might also want to include offers for accessories. Alternatively, you might display prices for different colors of the same product. In such cases, creating separate product groups can be very useful.

{% hint style="info" %}
Check the [Smart Groups](/ai/smart-groups.md) feature to create and assign product groups using AI.
{% endhint %}

### How to Use Groups

1. Add the groups you need at the top of the Content Egg metabox.

<figure><img src="/files/Aeyy2ehddpmoXASRQYbo" alt=""><figcaption></figcaption></figure>

2. Search and add products, then assign them to the corresponding groups.

<figure><img src="/files/d36sGStGGGkoQWNsyBck" alt=""><figcaption></figcaption></figure>

3. Pro tip: When searching for products, use the special syntax "*keyword -> group name*". After saving the post, the group will be automatically assigned to the product. This syntax also works for [auto-update keywords](/updating-products/updating-the-product-list.md).

<figure><img src="/files/snivPvyJKvBCEhGbBXah" alt=""><figcaption></figcaption></figure>

4. Select the group in the shortcode builder. The shortcode will then display only products with the assigned groups. You can also use multiple groups separated by commas.

<figure><img src="/files/NhPhyJdISj3GO7zyMd17" alt=""><figcaption></figcaption></figure>

5. There are special templates for group output. These templates will automatically create tabs for each group. You can also set the order of tabs in the group shortcode parameter.

```
[content-egg-block template=offers_logo_groups] 
[content-egg-block template=offers_list_groups groups="PlayStation 5 Digital,PlayStation 5 Disc Edition"]
```

<figure><img src="/files/bGlmODfd5DLz6X9AAEem" alt=""><figcaption></figcaption></figure>

### Static groups

If you want certain product groups to be available for **all posts by default**, you can use the `cegg_static_product_groups` filter.

Add the following code to your theme’s `functions.php` file (preferably in a **child theme**):

```php
add_filter('cegg_static_product_groups', function ($groups, $post_id) {
    $groups[] = 'Top Picks';
    $groups[] = 'Editor\'s Choice';
    $groups[] = 'Limited-Time Deals';
    return $groups;
}, 10, 2);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ce-docs.keywordrush.com/frontend/groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
