Archived topic
Text at top of blog index / archives page
7 replies · Started by Charles on March 30, 2021
Client wants to add a couple of paragraphs of text at the top of the blog index page (aka archives). Best way to do this? Tried Elements and set up a hook, but that didn't work.
Hi there,
Elements should be the way to go.
What didn't work for you?
Can you link me to the page in question?
That's what I figured. Which hook should I be using? Something before the main content?
That depends on where you are hoping to add the content.
Does this visual guide help?
https://docs.generatepress.com/article/hooks-visual-guide/#posts-page
Let me know :)
Yes, I found that page and it was very helpful! Bookmarked it.
My initial mistake was to add a block. This is what works:
Choose Element Type >> Hook
Settings >> Hook: generate_before_main_content
Display Rules >> Location: Blog
Block element should also work as well.
It's the same as the hook element but it allows you to use the block editor.
Thanks for your prompt help!
No problem :)