Two questions regarding conditions based on the URL

Hi,

1- How can I hide a specific element only within search results using a condition?

2- Also, how can I hide a specific element on only one particular page? For example, the shop page.

Thanks in advance for any guidance.


This is not the cleanesd implementation because it ignores the /search/ page and only works for the search results page with the url-query-parameter

Every page has a fixed post_id so if your shop page has an ID of e.g. 232 it could look like something like this:

You can find out your page_id in the WordPress editing screen from e.g. the URL:
grafik
In my Example the post_id is 2795

Best Regards
Suat