- This topic has 14 replies, 2 voices, and was last updated 7 months, 3 weeks ago by
Leo.
-
AuthorPosts
-
May 25, 2020 at 10:22 am #1300895
John
Hi
I want to style my author section in author page. How can I do this?
It can any good looking flat design style.
Thanks
May 25, 2020 at 10:39 am #1300920Leo
StaffCustomer SupportHi there,
We can’t really provide design suggestions here.
If you have a design or example in mind, we can try to point you in the right direction on how to achieve it.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 25, 2020 at 11:27 am #1301002John
Something like this https://www.authorityhacker.com/author/admin/
May 25, 2020 at 5:25 pm #1301310Leo
StaffCustomer SupportYou will need to create a page hero for something like that and assign to the author page.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 26, 2020 at 2:26 am #1301671John
Created a page hero but there is right margin blank space.
And How can I get author bio?
May 26, 2020 at 10:30 am #1302416Leo
StaffCustomer SupportYou’ve added this CSS to move the entire page to the left:
.author, .page-hero-gravatar { display: inline-block; }
You can create a shortcode for Author bio like this:
add_shortcode( 'author_bio', function() { ob_start(); echo wp_kses( get_the_author_meta( 'description' ), null ); return ob_get_clean(); } );
Then add
[author_bio]
in the header element.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 26, 2020 at 12:46 pm #1302544John
I’ve made the change to
.author, .page-hero-gravatar { display: inherit; }
It fixes the issue.
But how can I increase image size in author page?
And How to remove author image and bio from the content part?
May 26, 2020 at 8:41 pm #1302920Leo
StaffCustomer SupportI’m seeing this CSS added that’s setting the gravatar size:
.page-hero-gravatar img { width: 30px; height: 30px; border-radius: 50%; position: relative; vertical-align: middle; margin: 0 10px 0 0; }
Try this CSS to remove the default header:
.archive.author .generate-columns-container .page-header { display: none; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 26, 2020 at 8:54 pm #1302932John
Applied this CSS
.archive.author .generate-columns-container .page-header { display: none; }
It’s just hiding from the frontend but still found when I checked page source.
It’s okay for readers but google bot still can treat as duplicate.
Is there any option to remove them instead “display none”?
May 27, 2020 at 9:16 am #1303780Leo
StaffCustomer SupportTry this PHP snippet:
add_action( 'wp', 'lh_remove_author_archive_title' ); function lh_remove_author_archive_title() { if ( is_author() ) { remove_action( 'generate_archive_title', 'generate_archive_title' ); } }
Adding PHP: https://docs.generatepress.com/article/adding-php/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 27, 2020 at 9:42 am #1303806John
Works Great, Thanks Leo
May 27, 2020 at 9:43 am #1303807Leo
StaffCustomer SupportNo problem π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 27, 2020 at 11:23 am #1303919Leo
StaffCustomer SupportHey John,
Sorry I actually made a mistake in the code above.
Can you use the edited instead?
https://generatepress.com/forums/topic/style-author/#post-1303780Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 27, 2020 at 3:10 pm #1304151John
Thanks Leo, I’ve replaced the edited code
May 27, 2020 at 8:55 pm #1304339Leo
StaffCustomer SupportNo problem π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.