PriceFetchWP can display an external product price anywhere WordPress processes shortcodes, including Pages, Posts, and supported widget areas.
The basic shortcode can be:
[pfetch_price https://example.com/product]You can also write it using a URL attribute:
[pfetch_price url="https://example.com/product"]The URL should match an active URL Price Entry in PriceFetchWP so the plugin knows which selectors and fetching settings to use.
- – Displaying Prices
- – Using Price Shortcodes in Widgets
- – Override the Preferred Price Output
- – Override the Price Loader
- – Combining Shortcode Options
- – Global Settings Still Apply
- ⚠️ Common Issues
- The URL was automatically turned into a hyperlink
- The shortcode displays nothing in a widget
- The wrong price type is being displayed
- The loader is different from what I expected
- The shortcode shows no price
- The shortcode text appears on the page instead of the price
- The price does not update immediately
- A shortcode works on a Page but not in a widget
– Displaying Prices
Place the shortcode directly where you want the price to appear:
[pfetch_price https://example.com/product]For example:
Current Price: [pfetch_price https://example.com/product]PriceFetchWP will use the settings configured for the Page or Post where the shortcode is displayed.
– Using Price Shortcodes in Widgets
PriceFetchWP can also display prices inside supported WordPress widget areas.
First, enable: Run in widgets
under the appropriate PriceFetchWP section:
- Page Settings for widgets displayed on Pages
- Post Settings for widgets displayed on Posts
- WooCommerce Settings for widgets displayed on WooCommerce product pages
Then insert the shortcode into a widget or Shortcode block:
[pfetch_price https://example.com/product]If Run in widgets is disabled, PriceFetchWP price shortcodes inside widgets will not run.
Important: Keep the URL as Plain Text
Some WordPress editors and page builders may automatically turn a pasted URL into a clickable hyperlink.
The URL inside a PriceFetchWP shortcode should remain plain text.
Correct:
[pfetch_price https://example.com/product]Also correct:
[pfetch_price url="https://example.com/product"]Do not allow the editor to turn the URL into an HTML link such as:
[pfetch_price <a href="https://example.com/product">https://example.com/product</a>]If your editor automatically creates a hyperlink, remove the link formatting and leave only the plain URL inside the shortcode.
– Override the Preferred Price Output
By default, the shortcode uses the Preferred price output configured in the appropriate Page or Post settings.
You can override that setting for an individual shortcode using show="".
Default Price Output
[pfetch_price url="https://example.com/product" show="auto"]Displays the sale price when an available sale price is valid; otherwise displays the regular price.
Sale Price Only
[pfetch_price url="https://example.com/product" show="sale_only"]Regular Price Only
[pfetch_price url="https://example.com/product" show="regular_only"]WooCommerce-Style Price Display
[pfetch_price url="https://example.com/product" show="wc_like"]This allows a single shortcode to use a different output style without changing the global Page or Post setting.
You could summarize those in a table:
show value | Result |
|---|---|
auto | Default price output |
sale_only | Sale price only |
regular_only | Regular price only |
wc_like | WooCommerce-style price display |
Note: You may be wondering why ‘auto’ is for default. The plugin was previously updated away from this, and has yet to reflect the value. This will be addressed at a later date.
The shortcode also accepts the numeric equivalents 1, 2, 3, and 4, but I would probably leave those out of the public documentation. The named values are much clearer and there’s little reason to encourage people to use the numeric aliases.
– Override the Price Loader
If Delay price load is enabled, the shortcode normally uses the loader selected in the global Page, Post, or WooCommerce settings.
You can override the loader for an individual shortcode:
[pfetch_price url="https://example.com/product" loader="spinner"]Available loader values are:
spinner
ellipsis
bars
pulse
dual-ringFor example:
[pfetch_price url="https://example.com/product" loader="ellipsis"]or:
[pfetch_price url="https://example.com/product" loader="pulse"]You can also disable the loader for an individual shortcode:
[pfetch_price url="https://example.com/product" loader="0"]This does not disable delayed price loading itself. It only prevents the loading animation from being displayed while the price is being retrieved.
– Combining Shortcode Options
Options can be combined:
[pfetch_price url="https://example.com/product" show="sale_only" loader="pulse"]In this example, PriceFetchWP:
- Uses the specified product URL
- Displays only the sale price
- Uses the Pulse loader
- Overrides the corresponding global output and loader settings for this shortcode only
– Global Settings Still Apply
Unless a supported shortcode option overrides them, PriceFetchWP continues to use the settings configured for the current Page, Post, or WooCommerce context.
For example, a shortcode without show="" will use the configured Preferred price output, and a shortcode without loader="" will use the configured loader.
⚠️ Common Issues
The URL was automatically turned into a hyperlink
Some WordPress editors and page builders automatically convert pasted URLs into clickable links.
The URL inside a PriceFetchWP shortcode must remain plain text.
Correct:
[pfetch_price https://example.com/product]Also correct:
[pfetch_price url="https://example.com/product"]Incorrect:
[pfetch_price <a href="https://example.com/product">https://example.com/product</a>]If your editor automatically creates a hyperlink, remove the link formatting before saving the shortcode.
The shortcode displays nothing in a widget
Make sure Run in widgets is enabled for the area where the widget is being displayed.
For example:
- Page widget → enable Run in widgets under Page Settings
- Post widget → enable Run in widgets under Post Settings
- WooCommerce product widget → enable Run in widgets under WooCommerce Settings
The wrong price type is being displayed
If the shortcode does not include a show="" option, PriceFetchWP uses the global Preferred price output setting.
You can override it for one shortcode:
[pfetch_price url="https://example.com/product" show="regular_only"]or:
[pfetch_price url="https://example.com/product" show="sale_only"]The loader is different from what I expected
If the shortcode does not specify a loader, it inherits the configured global loader.
Override it with:
[pfetch_price url="https://example.com/product" loader="spinner"]Or disable the loader for that shortcode:
[pfetch_price url="https://example.com/product" loader="0"]The shortcode shows no price
Check that:
- The URL matches an active URL Price Entry
- The entry is not paused
- The URL and selectors pass Test Entry
- The external website is reachable
- Any required proxy or affiliate API settings are configured
The PriceFetchWP logs can also help identify why the price was not returned.
The shortcode text appears on the page instead of the price
This usually means the area where the shortcode was inserted is not processing WordPress shortcodes.
Try using a WordPress Shortcode block or another builder element that supports WordPress shortcodes.
The price does not update immediately
PriceFetchWP may be using a cached price.
Check the configured cache time for that URL entry or pricing area. Cached prices are reused until the cache expires.
A shortcode works on a Page but not in a widget
Page content and widget execution are controlled separately.
A shortcode can work normally on a Page while widget execution is disabled. Enable Run in widgets if you also want the shortcode to work in widget areas.
That would make the reference page much more useful because it gives users a quick self-service checklist before they jump into deeper troubleshooting docs.