> For the complete documentation index, see [llms.txt](https://docs.probloggertemplates.com/guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.probloggertemplates.com/guides/seoflex/getting-started/trending-posts.md).

# 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://323979841-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWEe3RjtDQ7wNsLsA20hR%2Fuploads%2Fq4T4jjEE6W64Qa2o50ge%2Fimage.png?alt=media&amp;token=28911c8d-d00b-46f9-8c53-44ad58651d73" alt="HTML/JavaScript" width="453"><figcaption></figcaption></figure>

### Popular Posts

<figure><img src="https://323979841-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWEe3RjtDQ7wNsLsA20hR%2Fuploads%2FU3Tmlp3rQJWLqFBso9O1%2Fimage.png?alt=media&amp;token=6d8cccc7-d931-4ecc-87b1-4bdc3ef34912" alt="Popular posts" width="443"><figcaption></figcaption></figure>
