# Pop ups on a specific page

**URL:** <https://meta.discourse.org/t/pop-ups-on-a-specific-page/100967>\
**Category:** Support\
**Created:** [10월 31, 2018, 12:03오후 UTC](https://meta.discourse.org/t/pop-ups-on-a-specific-page/100967 "2018-10-31T12:03:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattdamod](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdamod/32/65187_2.png) [@mattdamod](https://meta.discourse.org/u/mattdamod)\
**Post date:** [10월 31, 2018, 12:03오후 UTC](https://meta.discourse.org/t/pop-ups-on-a-specific-page/100967/1 "2018-10-31T12:03:32Z")

</div>

Hi, all.

I have some script that generates a pop when a user visits my community.

I know that it works by entering this scripts into the `</head>`, however, I don’t want it to appear on whichever page the user visits.

Essentially, I need to know, is there some script that I can add either before or after the pop-up script that will make the pop-up only visible on a certain page? For example, a specific topic?

If so, can someone please help?

Thanks

---

<div class="post-metadata">

**Author:** ![SidV](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sidv/32/119460_2.png) [@SidV](https://meta.discourse.org/u/SidV)\
**Post date:** [10월 31, 2018, 2:47오후 UTC](https://meta.discourse.org/t/pop-ups-on-a-specific-page/100967/2 "2018-10-31T14:47:17Z")

</div>

Sure.

Edit your theme with `/admin/customize/themes`  
Add your script like this:

```html
    <script type="text/javascript">
        if(window.location.href === "https://your-forum.com/t/the-topic-target/12345") 
        {
           ... your script here ...
        }
    </script>

```

I use it, works like a charm 🚀

---

<div class="post-metadata">

**Author:** ![mattdamod](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdamod/32/65187_2.png) [@mattdamod](https://meta.discourse.org/u/mattdamod)\
**Post date:** [11월 19, 2018, 11:17오전 UTC](https://meta.discourse.org/t/pop-ups-on-a-specific-page/100967/3 "2018-11-19T11:17:49Z")

</div>

Thanks for this!

Just a quick query, am I adding this to the Common CSS or in the head?

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [12월 19, 2018, 11:17오전 UTC](https://meta.discourse.org/t/pop-ups-on-a-specific-page/100967/4 "2018-12-19T11:17:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
