How to display an image only on blog posts page (but not on category pages)
-
Hi,
I have a problem with a display filter that I need to implement, and I don’t know how to do it. I explain:
I am using a WordPress theme completely made in Elementor, so the page that displays the list of category posts uses a template made in Elementor and therefore can be modified (I mean the page that is displayed, for example, when you go to mydomain.com/category/travel/).
So what I am trying is to create in Elementor a specific header for each category, which contains an image.
I’ve managed to make each header image display only in its corresponding category by using the Category property of the Taxonomy and filtering by each category.
But I run into 2 problems:
1- When the URL mydomain.com/blog/ is entered, the list of blog posts is displayed without filtering by any category. I’m trying to put a header image for this case, but I can’t, I don’t know how to indicate in the filters that it should only be displayed when all the categories are being displayed (or in other words, if you are not filtering by any category) . The only solution I can think of is to tell it to hide the image when any of the categories is selected, but it’s a very bad filter, because if I have 40 categories, I have to select all 40 in the filter one by one, which is very tedious, and also, if I add a new category, I have to remember to add it here (because I also don’t see an option in the category filter that says “if it is filtering by any category” or “if it is not filtering by any category”).
2- I want the header image to only be displayed on the first page of the pagination of the category post list, but not to appear on the following ones, that is, to be displayed on page 1, but no longer to appear on page 2 , in the 3, etc. But I don’t know how to do it, how can I indicate this with a filter?
Regards.
- The topic ‘How to display an image only on blog posts page (but not on category pages)’ is closed to new replies.