-
syoung
I would like to use a custom profile image instead of the gravatar for one of my writers, so it shows up in their author page. How do I do that?
-
Fernando
Hi Syoung,
For reference, can you provide a link to an author page of your site?
-
syoung
I added in private information
Here is what I see when I edit the user:
https://www.dropbox.com/s/zhm0ms1zim5rk6x/Screen%20Shot%202023-04-19%20at%209.08.48.png?dl=0
There is no place to change the picture.
-
Fernando
You can create a Block Element – Page Hero for that page and add a static image through a GB Image Block.
Reference: https://docs.generatepress.com/article/block-element-page-hero/
-
syoung
This is great. I didn’t know it was possible.
So now I have followup questions:
1. I still want the image to be dynamic. How do I change a user’s Avatar so it’s not a gravatar?
2. If I want to edit the page hero and also the way the posts are displayed do I need to create a hero element and also a content element? Or do I do this in the same place?
-
Fernando
1. You’ll need to add a plugin like ACF and add a new field to users so you can have another image field aside from the one from Gravatar.
2. Yes, that’s one way to do it. Another way is to use a Block Element – Loop Template instead. It depends on your preference.
-
syoung
Ok, that makes sense. Thank you.
I tried using a page hero and loop template, and can’t figure out how to style the page hero so the author image is right-aligned. I also can’t figure out how to improve the padding on the blog posts because now there is none. Can you help me with that, please?
-
Fernando
For the padding, I can see that you’re using a Container Block already on your Loop Template. Just add padding to this Container. Reference: https://docs.generateblocks.com/article/spacing-options-overview/
For the image, I would suggest placing them in a GB Grid Block instead as opposed to the WordPress Block you’re using. That should allow you better options for alignment.
-
syoung
The Grid block helped. Thanks. However, adding padding to the container doesn’t seem to have an effect.
-
Fernando
To clarify, are you using a Block Element Content Template or Loop Template?
Can you provide admin login credentials through the Private Information field so we can take a closer look?
-
syoung
Loop template. Login credentials provided.
-
Hi there,
1. For the Avatar, if you’re alraady using ACF and are happy to do that, then great.
Otherwise use this plugin:https://wordpress.org/plugins/simple-local-avatars/
It works seemlessly – by adding a avatar image field in the user profile, that will replace the avatar wherever it is used, including one displayed by GB.
2. The hero – do you have a layout mockup i can see ? I can then explain.
3. Could you raise a separate topic for the padding loop issue.
-
syoung
I got everything worked out except for the padding loop issue. Thanks. I’ll raise a separate topic.
-
Glad to hear that!
- You must be logged in to reply to this topic.