Archived topic
Create custom text which automatically appears on all pages
5 replies · Started by Derek on February 14, 2023
Hi There,
I would like to create a small box (border) that outlines about 2 lines of text on every post on my website. This would also show up on any new posts I create. What is the best way to do this??
Thanks for your help!
Hi Derek,
The best way to do this is through a Block Element. The concept would be similar to an Author Box. See this for example: https://www.youtube.com/watch?v=HMhUo91RjsE
To clarify, where would you want this "outlined Text box" on your Posts?
Hi Fernando,
Thanks for the reply. Yes I would like this "outlined text box" to appear at the top of every post before the title. Do you think this is the same process?
I see. You can use a Block Element - Hook. Hook it to after_header. You can see some examples here: https://docs.generatepress.com/article/block-element-hook/
Thanks for your help!
You're welcome, Derek!