# Trending Posts

Access your blog **Layout** > and click on the **Add a Gadget** > **HTML/JavaScript** or **Popular Posts** > in the **Trending Posts** section.

### HTML/JavaScript&#x20;

Shortcode: `{getPosts} $label={Label Name} $results={Number of Results}`&#x20;

Label Name: `Custom Label`, `recent`&#x20;

Number of Results: The attribute `$results={}` is optional! Default is `5`.

The `$label={}` attribute is optional! The default value is `recent`.

**Example:**

<figure><img src="https://787168730-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJoVhnsLwgc7ylgaqw6Gd%2Fuploads%2F3vR8VMIKDCbdxir6mmg6%2Fimage.png?alt=media&#x26;token=8be4da9a-5e62-4f7d-900a-51094041448f" alt="HTML/JavaScript" width="446"><figcaption></figcaption></figure>

### Popular Posts

<figure><img src="https://787168730-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJoVhnsLwgc7ylgaqw6Gd%2Fuploads%2FIcjH4qSG3gjUcwWjsfi7%2Fimage.png?alt=media&#x26;token=21a059ed-dec0-44d4-bdd1-9ad7393a4afb" alt="Access your blog Layout > and click on the Add a Gadget > HTML/JavaScript or Popular Posts > in the Trending Posts section. HTML/JavaScript  Shortcode: {getPosts} $label={Label Name} $results={Number of Results}  Label Name: Custom Label, recent  Number of Results: The attribute $results={} is optional! Default is 5. The $label={} attribute is optional! The default value is recent. Example:  Popular Posts" width="441"><figcaption></figcaption></figure>
