Archived topic
Author image/gravatar in Header Element
8 replies · Started by Vish on December 24, 2021
I want to show the author image in front of the author's name inside the header element. How to do this?
I did a quick search and almost all support replies point to this link: https://docs.generatepress.com/article/page-hero-examples/ which does not exist anymore.
Hi there,
i would recommend using the Block Element - example doc for creating page heros with them:
https://docs.generatepress.com/article/block-element-page-hero/
And part of that includes the GP Dynamic Image Block which provides an option for the avatar:
https://docs.generatepress.com/article/dynamic-blocks/#author-avatar
I use the Block element all the time but I found out that it does not have the 'merge with site header' option (See this: https://cln.sh/tW99xt). So, I can't merge the post header (made with Block Element) that I am creating, with the site header. Which is a deal breaker for me. Or is it there and I am not looking in the right place?
If the 'merge with site header' option is indeed not available in Block Element, could you please suggest a way to add author image in page hero?
Thanks.
For now you would create a separate header element solely to enable the Merge with Site Header option. It will merge the header with whatever content appears first on the page ie. your Block Element.
David - when using a block as a site header, is it possible to put the primary nav above the header? I need the block as site header to display an author avatar. So what I'm trying to do is this:
- secondary nav
- primary nav (used as header)
- site header
- content
Whatever settings permutations I've tried, the order ends up being:
- secondary nav
- site header
- primary nav
- content
Can you open a new topic for your question?
Thanks :)
I figured it out, I had my header elements using a custom hook to display below the secondary nav. I really need to take better notes!
Glad to hear :)
Thanks David. That did the trick!