> For the complete documentation index, see [llms.txt](https://wplake.gitbook.io/advanced-views/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wplake.gitbook.io/advanced-views/shortcode-attributes/post-selection-shortcode.md).

# 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*.
