- This topic has 3 replies, 2 voices, and was last updated 2 years, 6 months ago by
Ying.
-
AuthorPosts
-
August 20, 2022 at 8:19 am #2318474
Swadhin
Hi David,
I use the default WordPress author widget and with custom code (written below, please look at it in detail) that was given by my dev long back (2018). It has some schema markups also I think.
<div class="author-box"> <div class="avatar"> <?php echo get_avatar( get_the_author_meta( 'ID' ) ); ?> </div> <div class="author-info"> <h5 class="author-title" itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="name"><?php printf( get_the_author_meta( 'display_name') );?></span> </h5> <div class="author-summary"> <p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p></div> <div class="author-links"> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Read more"> ... </a> </div> </div> </div>
Now, the default WordPress author box is horrible with no formatting like line breaks for longer paragraphs. How can I achieve it (using GeneratePress)? Is it possible? If yes, please help me.
If not, I have a second option (only if the first one is impossible)..
I can give up the default WordPress widget and use something like maybe from Generateblocks (I have premium) which gives me more formatting options like social icons and line breaks.
Please help. 🙂
August 20, 2022 at 12:53 pm #2318604Ying
StaffCustomer SupportHi there,
You can try the Headline block from GenerateBlocks and enable its dynamic data option.
August 20, 2022 at 10:21 pm #2318761Swadhin
Hi Ying,
I think you missed my question (or please excuse me if I was unclear). 🙂
I meant to ask, I used the above code.. now if I use GB Block will the schema in the above code:
-
1. Still work?
2. That schema is no more needed and is incorporated by the theme.
3. That schema is usually handled by SEO plugins like Yoast/Rankmath, so you can remove that code and all will still function properly.August 21, 2022 at 11:23 am #2319317Ying
StaffCustomer SupportSorry I missed your point previously 😛
Now, the default WordPress author box is horrible with no formatting like line breaks for longer paragraphs. How can I achieve it (using GeneratePress)? Is it possible? If yes, please help me.
No, it’s not possible. WP strips the HTML tags from those fields. So it will only show one paragraph without any format.
1. Still work?
No, it won’t.
2. That schema is no more needed and is incorporated by the theme.
If you want to keep the schema, then keep using it as GB’s headline block won’t generate them.
3. That schema is usually handled by SEO plugins like Yoast/Rankmath, so you can remove that code and all will still function properly.
Where did you add this code? I don’t get the idea of how this code can work with the author widget(I don’t recall there’s such a widget in WP).
Let me know!
-
AuthorPosts
- You must be logged in to reply to this topic.