Question: I'm working with a CMS that I'm not familiar with and I'm generally new to this kind of stuff.

Would it be possible to target an id only on a specific page? What I'm trying to do is, roughly:

I have same few li elements on 2 pages and I'd like to change them on only one. The options in the CMS I'm using are very limited so it only allows me to disable or enable. I can add a class to those elements but since it's a script (and I know next to nothing about these) it's adding them globally, making it useless(?) for me. 

Any help would be appreciated

Answer: 
You can use [`window.location.pathname`](https://www.w3schools.com/js/js_window_location.asp) attribute and check the page.

```js
console.log("Current page = " + window.location.pathname);
if (window.location.href.indexOf('/js') > -1) {
  document.getElementById('target').innerHTML = "I'm in <b>/js</b> from <b>https://stacksnippets.net/js</b>";
}
```

```html
<span id="target">
</span>
```
IF we suppose that you indeed have 2 pages (2 php files) and you only want to change the list items in one of them, then you should include a JS file into the one you want to change.

i.e.:

JS:

```
<script>
var x;
document.getElementByID('myid') =  x;
</script>

```

Page 1:

```
  <?php
  <script src="../your/path/yourfile.js"></script>  

    <div>
     <ul>
     <li id="myid"></li>
     </ul>
    </div>

  ?>

```

Page 2:

```
<?php

  <div>
    <ul>
     <li></li>
    </ul>
  </div>

 ?>

```

That's what I have understand according to your question. If my answer is off-topic please inform me so i can update it.