Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #49782
    Jason
    Guest

    I have found the help section that explains the problem of text links automatically being converted to icons in the menu, but not how to implement the specific solution of getting rid of the email icon in favor of using “EMAIL” text.

    `function bgsc_remove_social_icon($networks){
    unset($networks[‘youtube.com’]);
    unset($networks[‘facebook.com’]);
    unset($networks[‘twitter.com’]);
    return $networks;
    }
    add_filter(‘boldgrid_social_icon_networks’ , ‘bgsc_remove_social_icon’);’

    Please explain. Thank you.

    #49798
    Brandon C
    Keymaster

    Hi Jason,

    Thank you for reaching out and thanks for using Crio Pro WordPress theme!

    The email fa icon in your social menu correlates with the mailto: anchor, so if you need to filter that icon out as well just replace your current snippet with the one below:

    function bgsc_remove_social_icon($networks){
    unset($networks[‘youtube.com’]);
    unset($networks[‘facebook.com’]);
    unset($networks[‘twitter.com’]);
    unset($networks[‘mailto:’]);
    return $networks;
    }
    add_filter(‘boldgrid_social_icon_networks’ , ‘bgsc_remove_social_icon’);

    I hope this helps. Please don’t hesitate to reach back out if you have any other questions for us.

    #50005
    Jason
    Guest

    Thanks. I tried that code, but the “:” in “mailto:” is producing this fatal error:

    The code snippet you are trying to save produced a fatal error on line 2:
    syntax error, unexpected ':', expecting ']'
    #50007
    Brandon C
    Keymaster

    Hi Jason,

    Oh yes my apologies, the colon : is not needed in this format. If you remove it from the snippet before saving it should allow you to proceed.

    #50008
    Jason
    Guest

    OK, I did that and there’s no error, but the icon hasn’t gone away from the menu.

    function bgsc_remove_social_icon($networks){
    unset($networks['mailto:']);
    return $networks;
    }
    add_filter(‘boldgrid_social_icon_networks’ , ‘bgsc_remove_social_icon’);
    #50012
    Brandon C
    Keymaster

    Thank Jason,

    I think I have it figured it out. The syntax was correct the way you had it at first with the colon left in. The problem is the way the quotations ' ' in the function were copied over. Try replacing your current snippet with this.

    function bgsc_remove_social_icon($networks){
    unset($networks['mailto:']);
    return $networks;
    }
    add_filter('boldgrid_social_icon_networks' , 'bgsc_remove_social_icon');
    #50021
    Jason
    Guest

    Of course! Typographer’s quotes. It’s working properly now. Thank you!

    #50028
    Brandon C
    Keymaster

    That’s awesome Jason!

    I’m happy you were able to get this resolved. Be sure to reach back out if you have any other questions for us!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘How do I convert the email icon to text in my social menu?’ is closed to new replies.