Tagged: Advanced Customization, Crio
- AuthorPosts
- April 8, 2022 at 2:39 pm #49782JasonGuest
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.
April 8, 2022 at 2:52 pm #49798Brandon CKeymasterHi 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.
April 12, 2022 at 10:58 am #50005JasonGuestThanks. 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 ']'
April 12, 2022 at 11:00 am #50007Brandon CKeymasterHi 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.April 12, 2022 at 11:19 am #50008JasonGuestOK, 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’);
April 12, 2022 at 11:25 am #50012Brandon CKeymasterThank 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');
April 12, 2022 at 12:37 pm #50021JasonGuestOf course! Typographer’s quotes. It’s working properly now. Thank you!
April 12, 2022 at 12:39 pm #50028Brandon CKeymasterThat’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!
- AuthorPosts
- The topic ‘How do I convert the email icon to text in my social menu?’ is closed to new replies.