[Support request] Something happens to my social icons on publishing

Home Forums Support Something happens to my social icons on publishing

Viewing 15 posts - 1 through 15 (of 30 total)
  • Author
    Posts
  • #1388918
    Randy

    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!

    #1389123
    David
    Staff
    Customer Support

    Hi 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:

    https://generateblocks.com

    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 🙂

    #1389335
    Randy

    Awesome, thanks for the fix, and especially the info on GenerateBlocks & GPP 1.11. I will definitely look into this!

    #1389338
    David
    Staff
    Customer Support
    #1390000
    Randy

    Funny, 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!

    #1390099
    David
    Staff
    Customer Support

    This video from Mike Oliver shows exactly that:

    #1390588
    Randy

    Thanks 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!

    #1390597
    Randy

    Ugh, 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!

    #1390905
    David
    Staff
    Customer Support

    Aside 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 ?

    #1391267
    Randy

    Yes, I had set the user Display rule to Administrator. And, I double-checked that I did change my wife’s role to Editor.

    Thanks!

    #1391274
    David
    Staff
    Customer Support

    Ooops … 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 ?

    #1391289
    Randy

    Yes, that should work. I’d just need to know where to put it. 🙂

    Thanks!

    #1391321
    David
    Staff
    Customer Support

    First 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.

    #1391728
    Randy

    Thanks 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!

    #1391735
    Randy

    Ah, I’m a little closer, I believe they are both showing up now, instead of one for each author.

Viewing 15 posts - 1 through 15 (of 30 total)
  • You must be logged in to reply to this topic.