# Post Gadgets

Access your blog **Layout** > and click on the **Add a Gadget** > **HTML/JavaScript** > in the **Sidebar** or **Footer** sections.

Shortcode: `{getPosts} $results={Number of Results} $label={Your Label} $type={Gadget Type} $style={Gadget Style} $color={Hex Color}`&#x20;

Label Options: `Label Name` or `recent`&#x20;

Type Options: `posts`, `comments`

Type Attribute: The `$type={}` attribute is only required for the `comments` type.&#x20;

Style Attribute: The `$style={}` attribute should only be added to `posts` type.

Posts – Style Options: `1`, `2`, `3`

Color Attribute: This attribute is optional and must be entered only if you want to add a custom color.

**Posts Example:**

<figure><img src="https://3691344887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqQzRWtJHRrbdZmizmyK%2Fuploads%2FwNKugEd37Zbu5UpAict2%2Fimage.png?alt=media&#x26;token=9aee8bbd-4549-4781-9a15-886d2c2218ee" alt="Post gadget" width="454"><figcaption></figcaption></figure>

**Comments Example:**

<figure><img src="https://3691344887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZqQzRWtJHRrbdZmizmyK%2Fuploads%2FK9pFBgUY5wvYG6BzFsFI%2Fimage.png?alt=media&#x26;token=25d7eea5-9b6a-4894-a418-2845acc86490" alt="Comments" width="451"><figcaption></figcaption></figure>

{% hint style="info" %}
INFO: For the comments type, the `$label={}` and `$style={}` attribute is not required.
{% endhint %}
