> For the complete documentation index, see [llms.txt](https://docs.billflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.billflow.io/no-code-integrations/no-code-app-builders/wordpress/add-widgets.md).

# Add Widgets

## Billflow **Shortcode**

### Step 1: Create a page to hold the Billflow widget.

You can create any page using your normal WordPress editor or page builder to do this.

### Step 2: Use the shortcode to place a billing page widget

| Shortcode                                           | Editor Screenshot                                                   |
| --------------------------------------------------- | ------------------------------------------------------------------- |
| `[billflow billing_page_id="your_billing_page_id"]` | <img src="/files/-MJbt2qvQGhHiL76-4gd" alt="" data-size="original"> |

### Optional Step: override additional configurations via the Shortcode parameters.

The shortcode examples above default to use the settings that you set in the Billflow plugin settings page. However, some people have the use case to override the settings for individual pages, so we have the following setting available to override using the shortcodes.&#x20;

### Available shortcode parameters

| `billing_page_id` |                                                     |
| ----------------- | --------------------------------------------------- |
| Example Value     | "9c7ECmmhey47zZsmEtWC"                              |
| Value Type        | String                                              |
| Description       | Your billing page id from dashboard.billflow\.io    |
| Example           | `[billflow billing_page_id="9c7ECmmhey47zZsmEtWC"]` |

| `gated`                                          |                                                                                      |
| ------------------------------------------------ | ------------------------------------------------------------------------------------ |
| Example Value                                    | "subscriber" OR "subscriber, customer"                                               |
| Value Type                                       | String OR Array of strings                                                           |
| Description                                      | String for the allowed user role OR An array of allowed user roles                   |
| <p>Example:</p><p>With a single allowed role</p> | `[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" gated="subscriber"]`               |
| <p>Example:</p><p>With a list of allowed </p>    | `[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" gated="basic_user, premium_user"]` |

| `logged_out_only`                                   |                                                                                                                                                            |
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Value                                               | true \| a redirect url relative                                                                                                                            |
| Description                                         | Makes the page a logged out only page, if a user is logged in, they will be sent to the home page if it is set to true. Or you can specify a redirect url. |
| <p>Example:<br>Redirect user to your home page</p>  | \[billflow billing\_page\_id="9c7ECmmhey47zZsmEtWC" logged\_out\_only="true"]                                                                              |
| <p>Example:<br>Redirect user to and custom page</p> | \[billflow billing\_page\_id="9c7ECmmhey47zZsmEtWC" logged\_out\_only="/my-portal-page"]                                                                   |

| `logged_in_only`                                           |                                                                                                                               |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Example Value                                              | "true" OR "/a-relative-url-to-the-domain"                                                                                     |
| Value Type                                                 | String                                                                                                                        |
| Description                                                | Makes the page a logged in only page, if a user is logged out, they will be sent to the login page or the redirect urlExample |
| <p>Example:</p><p>Redirect user to standard login page</p> | `[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" loggin_in_only="true"]`                                                     |
| <p>Example:</p><p>Redirect user to a custom page</p>       | `[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" loggin_in_only="/my-login-page"]`                                           |

| `upgrade`                                              |                                                                                                                                   |
| ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| Example Value                                          | "/a-relative-url-to-your-domain"                                                                                                  |
| Value Type                                             | String                                                                                                                            |
| Description                                            | If the current user does not have the role specified by the `gated` parameter, it will send the user to this upgrade page.Example |
| <p>Example:</p><p>Redirect user to an upgrade page</p> | `[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" gated="subscriber" upgrade="/upgrade-checkout-page"]`                           |

## Next: Advanced Usage

Click next to see how you can add custom frontend logics


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.billflow.io/no-code-integrations/no-code-app-builders/wordpress/add-widgets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
