{"id":120396,"date":"2023-06-23T12:03:01","date_gmt":"2023-06-23T06:33:01","guid":{"rendered":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/?post_type=documents&#038;p=120396"},"modified":"2023-06-26T16:26:35","modified_gmt":"2023-06-26T10:56:35","slug":"set-elementor-display-condition-based-on-url-string-or-parameters","status":"publish","type":"documents","link":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/docs\/set-elementor-display-condition-based-on-url-string-or-parameters\/","title":{"rendered":"How to Set Elementor Display Condition Based on URL String or Parameters?"},"content":{"rendered":"\n<p>Are you looking for ways to personalise your Elementor page experience? Setting display conditions based on URL string or parameters, can be a great way to deliver tailored experiences for visitors.<\/p>\n\n\n\n<p>The Display Condition extension of The Plus Addons for Elementor allows you to set display conditions based on specific URL string or UTM parameters.&nbsp;<\/p>\n\n\n\n<p><em>To check the complete feature overview documentation of The Plus Addons for Elementor Display Condition extension, <a href=\"\/docs\/display-conditions-settings-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">click here<\/a>.<\/em><\/p>\n\n\n\n<p><strong><em>Requirement&nbsp; &#8211; This extension is a part of The Plus Addons for Elementor, make sure it&#8217;s installed &amp; activated to enjoy all its powers.<\/em><\/strong><\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-a89b3969 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button has-custom-width wp-block-button__width-75 is-style-fill\"><a class=\"wp-block-button__link has-nxt-global-color-8-color has-nxt-global-color-1-background-color has-text-color has-background wp-element-button\" href=\"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/plus-extras\/display-rules?utm_source=tpae&amp;utm_medium=docs&amp;utm_campaign=text\" style=\"border-radius:5px\" target=\"_blank\" rel=\"noreferrer noopener\">LIVE WIDGET LINK<\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>To add display conditions based on URL, add any Elementor widget on the page.&nbsp;<\/p>\n\n\n\n<p>1. Go to <strong>Advanced<\/strong> &gt; <strong>Plus Extras : Display Condition<\/strong>.&nbsp;<\/p>\n\n\n\n<p>2. Turn on the <strong>Display Condition<\/strong> toggle.<\/p>\n\n\n\n<p>Now you\u2019ll see an option called <strong>Keep HTML<\/strong>. Enabling this will hide the content in the frontend if the condition is false but it will remain in the HTML (DOM).<\/p>\n\n\n\n<p>3. After selecting the appropriate option from the <strong>Display When<\/strong> dropdown, go to the <strong>Rules<\/strong> section, here you have to set the actual display condition. You can have one or multiple conditions\/rules.<\/p>\n\n\n\n<p>4. Then click on the <strong>Rule<\/strong> tab. Here you\u2019ll find different options under the <strong>URL <\/strong>label.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Set Elementor Display Condition Based on URL String?&nbsp;<\/h2>\n\n\n\n<p>You can easily show or hide content based on a specific URL string. This can be used to dynamically display different call to action elements on specific URL strings.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Note: These display conditions should be applied to the content in common templates like Header, Footer or Sidebar.<\/em><\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p>To set display conditions for a URL string &#8211;&nbsp;<\/p>\n\n\n\n<p>1. Select <strong>String<\/strong> from the first dropdown under the <strong>Rule<\/strong> tab.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"270\" height=\"1039\" src=\"https:\/\/etemplates.wdesignkit.com\/wp-content\/uploads\/sites\/55\/2023\/06\/display-condition-url-string.gif\" alt=\"display condition url string\" class=\"wp-image-120397\"\/><\/figure>\n\n\n\n<p>2. Then in the second dropdown, you have two options &#8211;&nbsp;<\/p>\n\n\n\n<p><strong>Is<\/strong> &#8211; This will make the statement true.<\/p>\n\n\n\n<p><strong>Not<\/strong> &#8211; This will make the statement false.<\/p>\n\n\n\n<p>3. In the last<strong> <\/strong>field, add the URL string.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Note: Only add the string value (shop), not the entire path.<\/em><\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p>For example, we want to show a CTA button in the header of all the product pages of a Woocommerce site. To do this, go to the header template and select the widget.&nbsp;<\/p>\n\n\n\n<p>After selecting <strong>String <\/strong>from the first dropdown, choose <strong>Is<\/strong> from the second dropdown.<\/p>\n\n\n\n<p>Then in the last field, add <strong><em>product<\/em><\/strong> as the string value.<\/p>\n\n\n\n<p>This will show the content in the header of all the product pages.<\/p>\n\n\n\n<p>If the option is set to <strong>Not<\/strong> in the second dropdown, it will reverse the condition.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Set Elementor Display Condition Based on URL Parameter?&nbsp;<\/h2>\n\n\n\n<p>UTM (Urchin Tracking Module) codes are snippets of text added at the end of a URL to track where the visitor has come from by clicking the URL. You can set display condition on your content based on different UTM parameters in the URL of the page. This can be very useful to show personalised content to visitors coming from different sources.<\/p>\n\n\n\n<p>To set display conditions for a URL parameter &#8211;&nbsp;<\/p>\n\n\n\n<p>1. Select <strong>Parameter<\/strong> from the first dropdown under the <strong>Rule<\/strong> tab.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"269\" height=\"1044\" src=\"https:\/\/etemplates.wdesignkit.com\/wp-content\/uploads\/sites\/55\/2023\/06\/display-condition-url-parameter.gif\" alt=\"display condition url parameter\" class=\"wp-image-120398\"\/><\/figure>\n\n\n\n<p>2. Then in the second dropdown, you have two options &#8211;&nbsp;<\/p>\n\n\n\n<p><strong>Is<\/strong> &#8211; This will make the statement true.<\/p>\n\n\n\n<p><strong>Not<\/strong> &#8211; This will make the statement false.<\/p>\n\n\n\n<p>3. In the last<strong> <\/strong>field, add the parameter.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>Note: Only add the parameter value (utm_source=email), not the entire path.<\/em><\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p>For example, we want to show a special welcome message to all the visitors coming from an email campaign and we\u2019ve set the UTM in the link as \u201cutm_source=email\u201d.&nbsp;<\/p>\n\n\n\n<p>To do this, select the widget, and after choosing&nbsp; <strong>Parameter <\/strong>from the first dropdown, choose <strong>Is<\/strong> from the second dropdown.<\/p>\n\n\n\n<p>Then in the last field, add <strong><em>utm_source=email<\/em><\/strong>.<\/p>\n\n\n\n<p>This will show that content to all the visitors coming by clicking on your UTM link.<\/p>\n\n\n\n<p>If the option is set to <strong>Not<\/strong> in the second dropdown, it will reverse the condition.<\/p>\n\n\n\n<p>Also, read <a href=\"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/docs\/set-elementor-display-condition-based-on-browser-site-language\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Set Elementor Display Condition Based on Browser\/Site Language<\/a>.<\/p>\n","protected":false},"author":25,"featured_media":120399,"parent":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","docs":[565,525],"class_list":["post-120396","documents","type-documents","status-publish","format-standard","has-post-thumbnail","hentry","docs-display-conditions","docs-plus-extras"],"acf":[],"_links":{"self":[{"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/documents\/120396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/documents"}],"about":[{"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/types\/documents"}],"author":[{"embeddable":true,"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/comments?post=120396"}],"version-history":[{"count":0,"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/documents\/120396\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/media\/120399"}],"wp:attachment":[{"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/media?parent=120396"}],"wp:term":[{"taxonomy":"docs","embeddable":true,"href":"https:\/\/etemplates.wdesignkit.com\/theplusaddons\/wp-json\/wp\/v2\/docs?post=120396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}