Page URL

Add or replace content on your website based on the page’s static URL or the URL Parameters.

What is the page URL condition?

The Page URL condition allows you to add or replace content on your website based on the page’s static URL or the URL Parameters.

Dynamic content can be displayed based on the exact URL or part of the URL.

For example, the condition If > Page URL > Contains > /category1 will be met both if the URL is exmpale.com/category1 and if the URL is example.com/category1/product1.

How to set up the Page URL condition:

  1. Download and activate the If-So Dynamic Content plugin.
  2. On your WordPress dashboard, go to “If-So → Add New Trigger
  3. Click on “Select a condition” and select “Page URL”.
  4. Select “URL”.
  5. Select an operator: “URL is” / “URL contains” / “URL is not” / “URL does not contain”.
  6. Type in a domain, a webpage URL, or a term.
  7. In the content field, set the content to be displayed if the condition is met.
  8. In the default content field, set content to be displayed if the condition is not met (optional, can be left blank).
  9. Press “Publish” and paste the shortcode generated by If-So in your website
  1. Download and activate the If-So Dynamic Content WordPress plugin and the Conditional Elementor elements integration.
  2. In the Elementor editor, select the element you want to display based on a Page URL Condition.
  3. In the element settings panel, go to the If-So tab.
  4. Choose the Page URL condition and select an operator: “URL is” / “URL contains” / “URL is not” / “URL does not contain”.
  5. Type in a domain, a webpage URL, or a term.
  6. Click Publish to save the page.
  1. Download and activate the If-So Dynamic Content WordPress plugin.
  2. In the Gutenberg editor, select the block you want to display based on a page URL condition.
  3. In the block settings sidebar, open the If-So Conditions panel.
  4. Choose the Page URL condition and select an operator: “URL is” / “URL contains” / “URL is not” / “URL does not contain”.
  5. Type in a domain, a webpage URL, or a term.
  6. Click Update to save the page.

Screenshots

1 5
Select the “Page URL” condition
2 5
Select an operator
3 6
Type in the webpage URL
4 5
Set the dynamic content

5 5
Set the default content
6 4
Paste the shortcode

FAQs

  • Does If-So work with caching plugins and server-side caching?

    Yes.

    Whether you are using a caching plugin or server caching, you can navigate to the plugin settings and enable the “Page Caching Compatibility” option.

    With the option enabled, dynamic triggers will be rendered in a separate request that will take place after the loading of the cached version.

    Learn more about Page Caching Compatibility.

  • Is it possible to set up conditional redirects (redirecting users to different pages based on conditions)?

    Yes, you can set up conditional redirects based on any If-So condition.

    For a step-by-step guide, click here.

Didn’t find what you need?

Spring Sale!

Up to 40% Off