9. Shortcodes
You can use shortcodes on your posts, pages and homepage.
Grotte Shortcodes
Product Category
[grotte_product_cat category=clothing number=4 heading=true viewall=true]
Make it
viewall=false the hide the "VIEW ALL" button.
Make it
heading=false the hide the category title & description.
All Product Categories
[grotte_product_cat_all number=4 heading=true]
Make it
heading=false the hide the category title & description.
Image
[grotte_image src="https://full_image_url_here" link="https://full_link_here" opennew="false"]
Make it
opennew=true to open the link in a new window. You may leave blank the
link value.
Header & Teaser
[grotte_header_and_teaser header="Header Here"]Teaser lorem ipsum dolor.[/grotte_header_and_teaser]
Recent Blog Posts
[grotte_recent_posts]
WooCommerce Shortcodes
Recent Products
Lists recent products – useful on the homepage. The ‘per_page’ shortcode determines how many products to show on the page and the columns attribute controls how many columns wide the products should be before wrapping.
[recent_products per_page="12" columns="4"]
Featured Products
Works the same as recent products but displays products that have been set as “featured.” In this example, the shortcode is saying: Show 12 featured products in 4 columns.
[featured_products per_page="12" columns="4"]
Single Product
Show a single product by ID or SKU.
[product id="99"]
[product sku="FOO"]
Multiple Products
Show multiple products by ID or SKU. Make note of the plural 'products'.
[products ids="1, 2, 3, 4, 5"]
[products skus="foo, bar, baz" orderby="date" order="desc"]
Product Category
Show multiple products in a category by slug.
[product_category category="appliances"]
Product Categories
Display product categories loop.
[product_categories number="12" parent="0"]
Set the parent paramater to 0 to only display top level categories. Set IDs to a comma separated list of category IDs to only show those.
Sale Products
List all products on sale.
[sale_products per_page="12"]
Best-Selling Products
List best-selling products.
[best_selling_products per_page="12"]
Top-Rated Products
List top-rated products.
[top_rated_products per_page="12"]
For more information, please see
WooCommerce Shortcodes.
Accordion Shortcode
Basic usage:
[accordion]
[accordion-item title="Title of accordion item"]Drop-down content goes here.[/accordion-item]
[accordion-item title="Second accordion item"]Drop-down content goes here.[/accordion-item]
[/accordion]
All features:
[accordion openfirst="false" openall="false" clicktoclose="true" scroll="false" autoclose="true"][/accordion]
For more information, please see this page:
Accordion Shortcodes
You can use Accordion Shortcodes for your "Frequently Asked Questions" page for example.