- This topic has 8 replies, 2 voices, and was last updated 2 years, 11 months ago by
David.
-
AuthorPosts
-
February 9, 2020 at 10:25 pm #1160179
Jodie
Hi guys
With your help I have this CSS in my additional CSS section in Customize.
/*START of Author Box */
.author-links a {
font-size: 3em;
line-height: 0.5em;
float: right;
}.author-box {
padding: 4%;
margin-top: 60px;
font-size: 0.8em;
}.author-box .avatar {
width: 100px;
border-radius: 100%;
margin-right: 20px;
float: left;
}h5.author-title {
margin-bottom: 0.5em;
font-weight: 700;
}.author-summary {
overflow: hidden;
}
/* END of Author BoxThe text I have is in the WP section for Biographical information for my profile.
I want to add line breaks so the text isn’t in one big block. I have tried placing html in that Biographical information box but it is not picked up.Have a look at the link I’ve given at the bottom of the post to see the Author box as it is now.
Any suggestions?
Thanks so much for your help as always.
Cheers
JodieFebruary 10, 2020 at 3:48 am #1160377David
StaffCustomer SupportHi there,
how is the author box added ? Are you using the plugin or a hook element ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 10, 2020 at 4:51 pm #1161171Jodie
Hi David. With a hook element as so
<?php
global $post;
$author_id = $post->post_author;
?><?php echo get_avatar( $author_id ); ?><h5 class=”author-title”><?php printf( esc_attr__( ‘About %s’, ‘the author’ ), get_the_author_meta( ‘display_name’) );?></h5>
<p class=”author-description”><?php echo wp_kses( get_the_author_meta( ‘description’ ), null ); ?></p>…February 10, 2020 at 5:10 pm #1161185David
StaffCustomer SupportTry replacing:
<?php echo wp_kses( get_the_author_meta( ‘description’ ), null ); ?>
with:
<?php echo nl2br( get_the_author_meta( 'user_description' ) ); ?>
This won’t display HTML such as
<br />
tags but it should maintain any line breaks you have in the descriptionDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 10, 2020 at 5:53 pm #1161209Jodie
Thanks very much David, I will try that.
Cheers
Jodie
February 10, 2020 at 5:59 pm #1161214Jodie
That worked. Thanks very much David.
February 10, 2020 at 6:14 pm #1161224David
StaffCustomer SupportAwesome – glad to hear that – i hadn’t tested it so much appreciated i am sure it’ll come in handy for others.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/February 10, 2020 at 6:47 pm #1161235Jodie
So glad I could help you guys out in the process of you helping me 🙂
Yes I hope it helps other too.
Cheers.
February 11, 2020 at 3:53 am #1161594David
StaffCustomer SupportI am sure it will 🙂
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.