[wps_collections]

shortcode

Since: v1.0.0

Source:

Displays collections optionally filtered by attributes

Examples:

      
// Simple usage to show all collections [wps_collections] // Show collections that contain specific slugs. [wps_collections slugs="product-a, another-great-product"] // Show collections that contain a specific word in the description. // Limit the number of collections that show per row to 5. [wps_collections desc="Sale!" items-per-row="5"] // Only show collections with specific ids (Shopify or WordPress) [wps_collections ids="302283, 13303283735"]

Avaialble attributes:

  • titles

    Allows for filtering collections that contain specific titles. Multiple values must be comma separated.

    Possible Values Example Default
    Any collection title [wps_collections titles="Collection A, Collection B"] false
  • slugs

    Allows for filtering collections that contain specific slugs. Multiple values must be comma separated.

    Possible Values Example Default
    Any collection slug [wps_collections slugs="collection-a, collection-b"] false
  • ids

    Allows for filtering collections by ID. Can either be the Collection ID found within Shopify or the WordPress Custom Post Type ID. Multiple values must be comma separated.

    Possible Values Example Default
    ID of Shopify collection or WordPress CPT [wps_collections ids="302283, 13303283735"] false
  • desc

    Allows for filtering collections that contain something within the collection description. Performs a fuzzy search which means if you use desc="app" then any collection with the text "app" in it's description will be returned—even if it belongs to another word like "apples".

    Possible Values Example Default
    Any string of text. Does not search for HTML. [wps_collections desc="Text found inside description"] false
  • orderby

    Allows for ordering collections by a specific criteria like title or slug.

    Possible Values Example Default
    title Order collections by title false
    published_at Order collections by published date false
    updated_at Order collections by most recently changed false
    manual Allows for manually ordering collections by attribute value position false
  • order

    Sorts collections ascendingly or descendingly. Used in combination with the orderby attribute. Asc orders from the smallest to the largest. Desc orders from the largest to the smallest.

    Possible Values Example Default
    asc [wps_collections order="asc"] false
    desc [wps_collections order="desc"] false
  • limit

    Limits the amount of collections returned.

    Possible Values Example Default
    Any positive number [wps_products limit="2"] false
  • breadcrumbs

    Shows breadcrumbs above collections.

    Possible Values Example Default
    true [wps_collections breadcrumbs="true"] false
  • pagination

    Whether to show pagination. When using the shortcode, pagination is turned off by default.

    Possible Values Example Default
    true [wps_collections pagination="true"] false
  • keep-permalinks

    Keeps the permalink structure to the current page URL when the shortcode output contains pagination. This allows the output to keep any custom shortcode filtering when navigating to page 2, page 3, etc.

    Possible Values Example Default
    true [wps_collections keep-permalinks="true"] false
  • items-per-row

    Sets the amount of products to list per row.

    Possible Values Example Default
    Any positive number [wps_collections items-per-row="5"] false
Copied!