# 8.9 \[lcw\_post\_grid]

The **LCW Post Grid** shortcode allows you to display a customizable grid of **restricted** posts with filtering options, including **post type**, **taxonomy**, **terms**, and **user-based access restrictions**. The shortcode also supports setting **the number of columns** and **customizing the "Read More" text**.

### **Shortcode Usage**

You can insert the shortcode anywhere in your WordPress content (pages, posts, widgets) using:

```html
[lcw_post_grid post_type="post" taxonomy="category" terms="news,updates" columns="3" posts_per_page="99" read_more_text="Read More"]
```

### **Shortcode Attributes**

The shortcode supports the following attributes:

| Attribute            | Description                                                           | Default Value | Example Usage                                |
| -------------------- | --------------------------------------------------------------------- | ------------- | -------------------------------------------- |
| **post\_type**       | Specify one or more post types (comma-separated)                      | `"post"`      | `post,page,custom_type`                      |
| **taxonomy**         | The taxonomy name (e.g., `category`, `custom_taxonomy`)               | `""` (empty)  | `category` or `product_cat`                  |
| **terms**            | Comma-separated list of term slugs or IDs to filter posts by taxonomy | `""` (empty)  | Category/ Term ID: `1`, `2`, `3`, `4...`     |
| post\_\_in           | display posts with only these IDs                                     | (empty)       | post/ custom post IDs: `1`, `2`, `3`, `4...` |
| post\_\_not\_in      | remove specific posts/ custom posts by IDs                            | (empty)       | post/ custom post IDs: `1`, `2`, `3`, `4...` |
| **columns**          | Number of columns in the grid (1-5)                                   | `3`           | `1`, `2`, `4`, `5`                           |
| **posts\_per\_page** | Number of posts to display                                            | `6`           | `8`, `10`, `12`                              |
| **read\_more\_text** | Custom text for the "Read More" button                                | `"Read More"` | `"Discover More"`                            |


---

# 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://better-wizard.gitbook.io/lead-connector-wizard/shortcodes/lcw-post-grid.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.
