Archived topic
How to insert text into a category archive
3 replies · Started by Nicole on November 23, 2022
I am trying to insert text before the list of posts in a category archive but it isn't showing. This is what I did:
1) I added a new element. I tried both block - hook and content template.
2) I selected location -> post category archive -> the category on which I want it to appear (test)
3) I added the text I wanted to appear in the archive for the selected category.
4) for the hook name I chose after_entry_title
I expected to see the text I inserted in domain.com/category/test
but it doesn't appear. Please let me know what I did wrong.
Hi there,
Try: generate_after_archive_title hook.
for reference:
https://docs.generatepress.com/article/hooks-visual-guide/#archives
Thanks! That solved the problem!
Glad to hear that !