How to display content only if a specific page id is met?

How do i show content if the pageid matches the conditions.

For example ive tried the following :

{% if page.id == "258384388" %}
Show Content
{% endif %}

{% if page.id contains "258384388" %}
Show Content
{% endif %}

{% if id == "258384388" %}
Show Content
{% endif %}

{% if id contains "258384388" %}
Show Content
{% endif %}

But still cant get it to work? I could probably also use page.handle but if the client changes the page title and/or handle, then it would mess everything up. Whereas the id wouldnt change regardless

1 Like

{% if page.id == 49700733008 %}
Show Content
{% endif %}

For anyone else looking for this.

1 Like

Thanks mate !

I was able to prevent a popup for a landing page by using this code on my theme.liquid…

Find:

{%- sections ā€˜popup-group’ -%}

Replace with:
{%- if page.title != ā€œEnter Page Titleā€ -%}
{%- sections ā€˜popup-group’ -%}
{%- endif} -%}