[lp_button]

You can use this shortcode to display buttons.


Product


Shortcode Attributes

There are a number of shortcode attributes available which you can use to customize the output.

  1. modal_id – Specifies the modal ID for the button if using a modal.
  2. url – Specifies the URL to navigate when the button is clicked.
  3. target – Specifies the target attribute for the button link.
    • Options:
      • _blank: Opens in a new tab or window.
      • _self (default): Opens in the same frame or tab.
      • _parent: Opens in the parent frame or tab.
      • _top: Opens in the main window, cancelling other frames.
  4. classes – Specifies additional CSS classes for styling the button.

Example Usage

[lp_button modal_id="myModal" classes="my-custom-button"]Open Modal[/lp_button]
[lp_button url="https://example.com" target="_blank" classes="external-link-button"]Go to Example[/lp_button]

Results

Example 1:
This will create a button that, when clicked, opens a modal with the ID myModal. The button will have the class my-custom-button:

<a href="javascript:;" class="lp-button button lp-modal-button my-custom-button" data-lp-modal-open="myModal">Open Modal</a>

Example 2:
This will create a button that links to https://example.com in a new tab (because of the _blank target). The button will also have the class external-link-button:

<a href="https://example.com" target="_blank" class="external-link-button">Go to Example</a>