Shortcodes are how you place product data inside a feed template in Product XML Feeds Manager for WooCommerce. This guide highlights the shortcodes you will reach for most often and shows the correct attributes for each. Every shortcode here is available in the free version.
Good to know: all shortcodes ship in the free plugin. There are no Pro-only shortcodes. For the complete list grouped by topic, see Shortcodes for generating XML fields, and for the attributes shared by every shortcode see Global Shortcode Attributes Reference.
Core product information #
[alg_product_name]: the product name. Example:[alg_product_name]. Tags are stripped by default (strip_tagsdefaults toyes).[alg_product_description]: the full description. Example with a fallback:[alg_product_description on_empty="Description not available."].[alg_product_sku]: the product SKU.[alg_product_url]: the product page URL.
Pricing and stock #
[alg_product_price]: the price. For variable products,variable_price_typechoosesrange(default),minormax. Example:[alg_product_price variable_price_type="min" decimal_padding="2"].[alg_product_categories_ids]: the IDs of the product’s categories.[alg_product_stock_availability]: the availability text. Usetrue_labelandfalse_labelfor custom in-stock and out-of-stock text, andremove_numberto drop the quantity. Example:[alg_product_stock_availability true_label="Available" false_label="Out of stock"].[alg_product_publish_date]: the publish date, formatted with PHP date syntax. Example:[alg_product_publish_date format="Y-m-d"].
Taxonomies, variations and helpers #
[alg_product_terms]: terms from any taxonomy. Attributes includetaxonomy,sepandorderby(name, parent_id, term_id or hierarchy). Example:[alg_product_terms taxonomy="product_cat" orderby="name"].[alg_product_available_variations]: lists a variable product’s variations. Attributes:sep,sep2andsep3. Example:[alg_product_available_variations sep=", " sep2=": " sep3=" | "].[alg_product_custom_value]: outputs its wrapped content. Withshow_onsale="yes"it only outputs when the product is on sale. Example:[alg_product_custom_value show_onsale="yes"]On Sale[/alg_product_custom_value]. There is novalueattribute; put your text between the tags.[alg_format_number]: formats the wrapped value as a number. Attributes:decimals,dec_point,thousands_sep. Example:[alg_format_number decimals="2"][alg_product_meta name="my_field"][/alg_format_number].[alg_to_timestamp]: converts the wrapped date string to a Unix timestamp. Example:[alg_to_timestamp]2024-08-01[/alg_to_timestamp].
Formatting and helper shortcodes such as [alg_format_number] and [alg_to_timestamp] work by wrapping another shortcode or a raw value, not by passing the value as an attribute. This lets you chain them, for example to format a custom meta value as a number.
Need a hand? #
Every shortcode above is free. Our team answers every ticket on the Product XML Feeds support forum. To unlock unlimited feeds and advanced product filtering, see Product XML Feeds Manager for WooCommerce Pro.
