# Wordpress conditional page with Mautic Plugin

**URL:** <https://forum.mautic.org/t/wordpress-conditional-page-with-mautic-plugin/26145>\
**Category:** General Discussion\
**Created:** [November 22, 2022, 12:12am UTC](https://forum.mautic.org/t/wordpress-conditional-page-with-mautic-plugin/26145 "2022-11-22T00:12:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xmontero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xmontero/32/7499_2.png) [@xmontero](https://forum.mautic.org/u/xmontero)\
**Post date:** [November 22, 2022, 12:12am UTC](https://forum.mautic.org/t/wordpress-conditional-page-with-mautic-plugin/26145/1 "2022-11-22T00:12:05Z")

</div>

I need a “thank you page” in WordPress to show different content in function of if a Mautic lead is identified or not.

# Context

I have a squeeze funnel like this in WordPress:

- [https://example.com/checklist](https://example.com/checklist) =\> A page showing a mautic form.
- [https://example.com/checklist/thank-you-6347861](https://example.com/checklist/thank-you-6347861) =\> A page showing the thankyou message and a button to download.

## Form

As soon as the lead submits the form, Mautic redirects to the thank-you page.

## Email funnel

I want to play around with a mini-funnel via email that starts with a couple of emails like this:

- **Email 1 =\> Sent Instantly after the form submit =\>**
  - It’ll say: “You can download the checklist here” and set the link to the thank you page: [https://example.com/checklist/thank-you-6347861](https://example.com/checklist/thank-you-6347861)
  - This is not strictly necessary because he already was redirected, but may help if the download fails and he wants to download it later.
  - Although the thank-you page URL is static I’ll tell “this is your personalized URL for you, don’t share it; in a few minutes I’ll send you an email so you can forward it to your friends”

- **Email 2 =\> Sent 15 mins after Email 1 =\>**
  - An email saying “hey, you can share the checklist with your friends forwarding them this email” and set a link to [https://example.com/checklist](https://example.com/checklist)

## Possible non-desirable behaviour

If lead Alice forwards Email-1 to Bob, then Bob will be able to download the checklist wihtout leaving me the email address. This is equivalent to Alice sending out the PDF she just downloaded, so there’s no “security risk” in here.

BUT

In case Alice sends the email with the link to the thank you page [https://example.com/checklist/thank-you-6347861](https://example.com/checklist/thank-you-6347861) to Bob and Bob is not a lead in my mautic, I want that the WordPress redirects to the form (or if not redirected, put a button saying “click here to download” and sending to the form) instead of displaying the download button.

# Question

How can the WordPress detect, via the Mautic plugin, if the visitor has an email or is anonymous, and change the content in function of that?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [November 22, 2022, 10:27am UTC](https://forum.mautic.org/t/wordpress-conditional-page-with-mautic-plugin/26145/2 "2022-11-22T10:27:12Z")

</div>

Would Dynamic Web Content solve this use case?

> **[Dynamic Web Content (DWC) | Mautic](https://docs.mautic.org/en/components/dynamic-web-content)**
>
> . Mautic 2.0 introduced the ability to embed content on a web page dynamically for both anonymous visitors and known contacts.There are 2 types of Dynamic Web Content items (or DWC):. Filter based. This feature allows you to configure filters (like...

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [November 23, 2022, 6:48am UTC](https://forum.mautic.org/t/wordpress-conditional-page-with-mautic-plugin/26145/3 "2022-11-23T06:48:21Z")

</div>

Agree with @escopecz, you can do this with Dynamic content

Set a DC filter - if email field is empty it shows content that contains the form. If not empty it will not show a form.

Then you insert a slot with a short code on the website where you want the DC to show

---

<div class="post-metadata">

**Author:** ![xmontero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xmontero/32/7499_2.png) [@xmontero](https://forum.mautic.org/u/xmontero)\
**Post date:** [November 23, 2022, 9:26am UTC](https://forum.mautic.org/t/wordpress-conditional-page-with-mautic-plugin/26145/4 "2022-11-23T09:26:53Z")

</div>

Will try, friends! Thanks!
