To solve the issue with the page cache affecting the dynamic element displaying the visitor’s country code and flag, you can use the URL exclusion feature in WP-Optimize. By excluding the specific URLs where this dynamic content appears, you can prevent those pages from being cached and ensure the dynamic elements function correctly.
Here are the steps to do this in WP-Optimize:
- Navigate to WP-Optimize Cache Settings:
- Go to your WordPress admin dashboard.
- Navigate to
WP-Optimize
> Cache
.
- Exclude the Product Page URL:
- Under the “Advanced Settings” tab, find the “URLs to exclude from cache” field.
- Enter the path of the URL where the dynamic content appears. In this case, you will add
/product/the-shield-wallet/
to the list of URLs to be excluded from caching.
- Save the changes.
- Clear the Cache:
- Clear your site’s cache to ensure the changes take effect.
By following these steps, you will ensure that the dynamic elements on your product page will continue to function correctly, even with the page cache enabled.