# Post Selection Shortcode

{% hint style="info" %}
This page contains *Post Selections* specific shortcode arguments. You can read about general arguments, that are the same for *Layouts* and *Post Selections* [here](https://docs.advanced-views.com/shortcode-attributes/common-arguments).
{% endhint %}

## Default shortcode

[Classic shortcode](https://docs.advanced-views.com/shortcode-attributes/common-arguments#how-to-embed-the-shortcode):

```bbcode
[avf-post-selection name="Name of Post Selection" id="651d5d747423a"]
```

{% hint style="info" %}
Note: this displays the *Post Selection*, posts will be queried according to the filters and displayed according to the selected *Layout*, replace id="651d5d747423a" with the ID of your *Post Selection*.
{% endhint %}

[In PHP code](https://docs.advanced-views.com/shortcode-attributes/common-arguments#how-to-embed-the-shortcode):

{% code overflow="wrap" %}

```php
<?php

// a) using do_shortcode
echo do_shortcode('[avf-post-selection name="Name of Post Selection" id="651d5d747423a"]');

// b) using the special plugin class
use Org\Wplake\Advanced_Views\Bridge\Advanced_Views;

echo Advanced_Views::card_shortcode('651d5d747423a', 'name')
    ->render();
```

{% endcode %}

By default, *Post Selection* shortcodes contain two arguments: "name" and "id". The "name" is used for clarification purposes only and doesn't play any functional role. The "id" argument is the most important as it allows Advanced Views to associate the shortcode with a specific *Post Selection*.


---

# 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://wplake.gitbook.io/advanced-views/shortcode-attributes/post-selection-shortcode.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.
