- This topic has 29 replies, 3 voices, and was last updated 3 years, 7 months ago by Randy.
-
AuthorPosts
-
August 5, 2020 at 7:55 pm #1388918Randy
Hi. When I draft a new post and add an Profile Block (Atomic Blocks), the social icons look correct (icon within circle). But, after publishing the post, the icons look smaller wth the circle and appear off-center. See this post.
Any idea what’s going on, or how to fix?
Thanks in advance!
August 6, 2020 at 1:38 am #1389123DavidStaffCustomer SupportHi there,
thats an issue with that plugins CSS – its setting the height to create the circle around the icon but it hasn’t add the correct line-height to icon. Might be worth reporting it to the plugin author.
In the meantime you can add this CSS to fix the issue:
.ab-block-profile .ab-social-links li i { line-height: 38px; }
Or you may want to check our block plugin:
This handles Icons in buttons without the need to load the font awesome font library.
And with GPP 1.11 you can use the new Block Element:https://generatepress.com/gp-premium-1-11-0-block-elements/
This will allow you to create an author box for example and hook it into the bottom of every post in one go 🙂
August 6, 2020 at 5:39 am #1389335RandyAwesome, thanks for the fix, and especially the info on GenerateBlocks & GPP 1.11. I will definitely look into this!
August 6, 2020 at 5:42 am #1389338DavidStaffCustomer SupportYou’re welcome
August 6, 2020 at 11:37 am #1390000RandyFunny, I didn’t realize that 1.11 was just released, so I am looking into this now. But, is there a guide or instructions on creating an author block.
I am playing around with a Grid item, want to make sure I do it the best way, including text, background colors, etc.
Thanks!
August 6, 2020 at 12:39 pm #1390099DavidStaffCustomer SupportThis video from Mike Oliver shows exactly that:
August 6, 2020 at 8:42 pm #1390588RandyThanks for the video!
I did an author block (still trying to improve the spacing). But, is there an easy way to assign an author box to a specific user?
I didn’t see a specific option other than to assign a different user role. I assigned my wife as an Editor and my Author Box’s role for Administrator. But, my box still shows up on my wife’s posts (https://www.williswired.com/2015/06/25/stretch/).
Thanks for your help!
August 6, 2020 at 8:55 pm #1390597RandyUgh, hate to add another question to this, but is there a good way to delete the Author Block I created in Atomic Blocks since it’s no longer needed, other than manually removing it to the ones I added it to?
I added it to a number of blog posts, but deactivating didn’t seem to help. Thanks again!
August 7, 2020 at 2:07 am #1390905DavidStaffCustomer SupportAside from searching and replacing in yours sites database, there is no simple way to remove blocks inside the content.
Have you tried setting your author block role USER Display rule to Administrator ?
August 7, 2020 at 6:00 am #1391267RandyYes, I had set the user Display rule to Administrator. And, I double-checked that I did change my wife’s role to Editor.
Thanks!
August 7, 2020 at 6:04 am #1391274DavidStaffCustomer SupportOoops … must be the heat and lack of coffee as thats completely wrong.
That is only for the logged in state of the user. Not author role.We can use some PHP to switch them for the different authors – if you’re interested ?
August 7, 2020 at 6:12 am #1391289RandyYes, that should work. I’d just need to know where to put it. 🙂
Thanks!
August 7, 2020 at 6:32 am #1391321DavidStaffCustomer SupportFirst you would create your two block elements.
Whilst editing the block – inspect the URL and write down the ID number.
Then use this PHP snippet:add_filter( 'generate_block_element_display', function( $display, $element_id ) { //First Author if ( 10 === $element_id && is_author( 'Tom' ) ) { $display = true; } //Second Author if ( 20 === $element_id && is_author( 'Leo' ) ) { $display = true; } return $display; }, 10, 2 );
The two IF conditions need to be updated with the ID eg.
10
and the author name to match yours.August 7, 2020 at 9:09 am #1391728RandyThanks for the code. I haven’t quite got it working yet. I changed the names, but may not be clear on the element_id, but I did add & activate in the Code Snippets plugin …
add_filter( 'generate_block_element_display', function( $display, $element_id ) { //First Author if ( 10 === $element_id && is_author( 'Randy Willis' ) ) { $display = true; } //Second Author if ( 20 === $element_id && is_author( 'Joleen Willis' ) ) { $display = true; } return $display; }, 10, 2 );
I’m sure I’ve missed something, but not sure what. Thanks!
August 7, 2020 at 9:15 am #1391735RandyAh, I’m a little closer, I believe they are both showing up now, instead of one for each author.
-
AuthorPosts
- You must be logged in to reply to this topic.