[loadmore]
The shortcode generates a “Load More” button. This button is typically used in conjunction with a listing or grid of items, allowing users to load additional items without refreshing the page.
Product
Shortcode Attributes
- label – The text displayed on the button.
- Default:
Load more. - Options: Any text value.
- Default:
- listing_selector – The CSS selector for the container that holds the items to be loaded. This is used by JavaScript to identify the listing.
- Options: Refer to CSS Selector Guide.
- initial_items – The number of items initially displayed.
- Default: Same as of
items_to_show. - Options:
1,2,3,4,5,6. Specify one only.
- Default: Same as of
- items_to_show – The number of additional items to load each time the button is clicked.
- Default:
3. - Options:
1,2,3,4,5,6. Specify one only.
- Default:
Example Usage
[loadmore label="Show More" listing_selector=".product-list" initial_items="9" items_to_show="6"]
Results
| Example: The shortcode generates an HTML button with the specified label Show More, CSS selector for the listing container .product-list, 9 of items initially displayed and 6 of items to load when the button is clicked. |
listing_selector attribute points to the correct container in your HTML.