{"id":4097,"date":"2020-05-23T00:09:08","date_gmt":"2020-05-23T00:09:08","guid":{"rendered":"https:\/\/the7kennisbank.nl\/?p=4097"},"modified":"2020-05-29T13:20:11","modified_gmt":"2020-05-29T13:20:11","slug":"how-to-add-a-custom-social-icon","status":"publish","type":"post","link":"https:\/\/the7kennisbank.nl\/en\/dream-theme-support-portal\/how-to-add-a-custom-social-icon\/","title":{"rendered":"How to add a custom social icon"},"content":{"rendered":"
<\/head><\/p>\nStarting from 5.4.x The7 theme update, there was changed icon format from SVG to font. If you want to add custom social icons to the theme, you should prepare font and paste this font to child theme, then add PHP and CSS code with required modificaton to function.php and style.css child theme files.<\/p>\n
To prepare font, you can use fontello.com<\/a> online service, just import predefined configuration file<\/a><\/p>\n Fig. 1. Import config file.<\/p>\n<\/div>\n Upload own SVG file or choose icon from fontello library, then edit glyph, configure glyph name to the name that you use into PHP array<\/p>\n Fig. 2. Glyph options.<\/p>\n<\/div>\n After you finish, download webfont and unpack it. Fig. 3. Social CSS rules before<\/p>\n<\/div>\n You need to modificate CSS rules to be like this\u00a0 In result, the CSS will looks like this<\/p>\n Fig. 4. Social CSS rules after modification<\/p>\n<\/div>\n How to prepare SVG<\/strong><\/p>\n You can prepare SVG by using online SVG editor http:\/\/editor.method.ac<\/a>
<\/a><\/p>\n
<\/a><\/p>\n
Copy \u201cfont\u201d<\/strong> folder that persist into the archive to the root dir of your child theme.
Open css\/my-social-icon-codes.css file from the downloaded archive, that should looks like this:<\/p>\n
<\/a><\/p>\n\".icon_name .soc-font-icon: { content: 'eXXX'; }\"<\/code> where XXX icon code.<\/p>\n
<\/a><\/p>\n
Open SVG, set image size 16\u00d716<\/p>\n