Archived topic
Header Element different one for the first page of Category archive only?
23 replies · Started by nomadiceman on July 18, 2021
I maybe should have explained that I have a different header element for each of my category archives already
Strange, I've done the same setup on these 2 sites and it's working well.
- https://dev-generate-press.pantheonsite.io/category/campaigns/
- https://dev-generate-press.pantheonsite.io/category/campaigns/page/2/
I've changed the setup to use 2 block elements rather Header elements and you can see that it's working.
I'm using the same code.
That said, any chance you can provide us temporary backend access to check?
I maybe should have explained that I have a different header element for each of my category archives already
Ah i saw this late.
If this is the case then you may have to specify this on the condition.
Any ideas how to do that?
By adding the is_category() to the condition specifying the category.
Example:
if ( 10 === $element_id && !is_paged() && is_category('news') )
Ok great. Thank you very much for your help
Have you sorted it out? Let me know if you need further help with it. :D
Awesome. It seems to work great thank you
Nice one. Glad you got it sorted. :D