Site logo

Archived topic

Only activate/display Element Hook on first page of Post Category Archive

4 replies · Started by Pete on December 10, 2021

Viewing posts 1–5 of 5

I have inserted an image generate_after_archive_description using the Element Hook on the XYZ Post Category Archive location. The archive runs over many pages. I only want the hook to be activated on the first Post Category Archive page e.g. https://www.abc.org.au/category/clubs but not the subsequent pages e.g. https://www.abc.org.au/category/clubs/page/2 and so on. Is there a way to work around this?

Ahhhh, I've had a look at the class and there's the .paged class. I'll try that.

Brilliant, thanks David.

You're welcome

This archived topic is closed to new replies.