-
AuthorPosts
-
April 25, 2016 at 11:40 pm #621779
Hello, is there a way that I can add one or more of the social media icons found here
to my social media icons in my Enfold theme? These icons are not among the fontello icons.If there isn’t a way to do this, then could I just create my own icon somehow and add it?
Thanks,
SabineApril 27, 2016 at 5:05 am #622705Hi Sabine,
We might be able to help you out getting it in but we would need a link to the icon and where you would like to place it? You won’t get them in the theme option but we might be able to give you custom CSS.
Thanks,
RikardApril 27, 2016 at 5:48 am #622727Hi, the link is http://jpswalsh.github.io/academicons/ From here I believe you can download the icons. The two icons I’m interested in are the google scholar icon and the research gate (the ones in black font/white background). Let me know if you need further information!
April 27, 2016 at 6:13 am #622741Hi!
You can load the custom font, to your child theme header file, by adding:
<link rel=”stylesheet” href=”https://raw.githubusercontent.com/jpswalsh/academicons/master/css/academicons.css” />
or by downloading the folder, upload to your FTP and then link it from there.
After, when you done that, we have to replace the social icon content:’ ‘ ;When you done that, please provide us a link and we will help you repalce
Regards,
BasilisApril 27, 2016 at 6:47 am #622762When you say add it to my child theme header file do you mean the header.php which I can find in the Enfold child them folder? Not a file that is available in the Editor (in the ‘Appearance’ tab)?
April 27, 2016 at 6:51 am #622766I am not sure where to find the header file within the child theme folder.
April 27, 2016 at 6:56 am #622774I’ve only been able to find a header.php folder in my parent enfold theme folder, not the child theme. Child theme only has functions.php and style.css.
I shouldn’t change the parent file, right? Please let me know what I should do. Thanks!
April 27, 2016 at 7:22 am #622789Hi!
Please copy the header.php from main theme to child theme and make your changes. Please check this link for more info kriesi.at/documentation/enfold/using-a-child-theme/
Best regards,
VinayApril 27, 2016 at 5:49 pm #623261Hello,
Okay I added the header.php file to the child theme and made the suggested change at the end of the file. Also sending a link via Private Content. Please let me know what else I need to do.
Thanks!April 28, 2016 at 4:49 pm #623879Hi, any update?
April 29, 2016 at 4:56 pm #624649Hi again,
Can you let me know if you are working on this? Thanks!April 30, 2016 at 1:08 pm #624966Hi,
I’m working on this but i need you do the following:
1. Download the Academicons zip package.
2. Upload the contents of it to your child theme directory.Alternatively if you hand me a FTP account i can do this for you.
Best regards,
JosueApril 30, 2016 at 4:43 pm #625072I’m sending the info so that you can use an FTP account to do this. Let me know if you need anything else – thanks!
April 30, 2016 at 11:05 pm #625148Hi,
It does connect but i’m greeted with an empty directory – http://screencast.com/t/VC2PZnPcCb
Best regards,
JosueMay 1, 2016 at 2:31 am #625213Sorry, I don’t know how to set up the FTP/have never used it. I uploaded the contents of the academicons zip to the enfold child theme. Let me know if there is anything else I should do. Thanks!
May 2, 2016 at 3:59 pm #625872Hello again, just checking in on the status of this request. How is it going?
May 3, 2016 at 3:21 pm #626525Hi,
Sorry for the delay.
We checked the issue but could not get it to work as we are not aware of the location of the required css files and fonts from academicons.
We have removed the below code from functions.php
add_action('wp_head', function() { ?> <link rel="stylesheet" href="https://raw.githubusercontent.com/jpswalsh/academicons/master/css/academicons.css" /> <?php }); // Add new icon as an option for social icons function avia_add_custom_social_icon($icons) { $icons['Google Plus Academic'] = 'academicons_gplus'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
Download the zip from https://github.com/jpswalsh/academicons and upload the required css and fonts to the child theme directory
We have already added the below code to functions.php just edit the social links in the below code where it say’s “https://link.com/GoogleScholar” and “https://link.com/ResearchGate”
//custom icon css function academicons_styles() { /* Custom Icons */ wp_register_style( 'academicons', 'https://raw.githubusercontent.com/jpswalsh/academicons/master/css/academicons.min.css' ); wp_enqueue_style( 'academicons'); } add_action( 'wp_enqueue_scripts', 'academicons_styles'); //custom icons function add_custom_icons(){ ?> <script> jQuery(window).load(function(){ jQuery('.av-sidebar-social-container .social_bookmarks').append(" <li class='social_icon_3'><a target='_blank' href='https://link.com/GoogleScholar' aria-hidden='true' title='Google Scholar'> <i class='ai ai-google-scholar'></i></a></li> <li class='social_icon_4'><a target='_blank' href='https://link.com/ResearchGate' aria-hidden='true' title='Research Gate'> <i class='ai ai-researchgate'></i> </a></li> "); }); </script> <?php } add_action('wp_footer', 'add_custom_icons');
Best regards,
VinnieMay 5, 2016 at 5:03 am #627591Hello,
I’m not sure what I need to do now in order to get the icons to appear. I mentioned previously that I already uploaded the files to the child theme. I don’t know what kind of edit you are asking me to do to the functions.php. What should I type exactly?Thanks!
May 5, 2016 at 3:34 pm #627863Hey!
Sorry for my late reply, please check your site. I’ve changed the icon of the gplus social link (it’s set in style.css, no need to edit functions.php). One issue though (unless you plan to only use gplus) is that Academicons only have these glyphs available – http://jpswalsh.github.io/academicons/
Cheers!
JosueMay 5, 2016 at 3:46 pm #627874Hi, thanks for your help, but I didn’t ask to change the mail icon to googleplus. Can you please reverse that change? The icons I want to add are: ai_research gate, ai_googlescholar, and ai_academia (in addition to mail and twitter, so five icons if possible?). Can you tell me how to add and remove specific academicons? That way I can adjust it myself if I want to.
Thanks!
May 6, 2016 at 2:30 am #628042Done, the 3 new custom icons has been added:
http://sabinedoebel.com/wp-admin/admin.php?page=avia#goto_socialTo add/remove custom icons you’d just have to modify this function i placed in your child theme functions.php (follow the same pattern):
function avia_add_custom_social_icon($icons) { $icons['Ai Research'] = 'ai_research'; $icons['Ai GoogleScholar'] = 'ai_googlescholar'; $icons['Ai Academia'] = 'ai_academia'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
Additionally, in child style.css:
#top .social_bookmarks_ai_research a:before { content: "\e902"; font-family: "Academicons"; } #top .social_bookmarks_ai_googlescholar a:before { content: "\e900"; font-family: "Academicons"; } #top .social_bookmarks_ai_academia a:before{ content: "\e910"; font-family: "Academicons"; }
To get the icon codes (e910, e900, etc):
http://sabinedoebel.com/wp-content/themes/enfold-child/academicons.css?ver=3.5.3.1461188191Regards,
JosueMay 6, 2016 at 2:32 am #628043Also, to change the hover background color use the following:
#top #wrap_all .social_bookmarks_ai_research:hover a{ background: red; color: white; } #top #wrap_all .social_bookmarks_ai_googlescholar:hover a{ background: green; color: white; } #top #wrap_all .social_bookmarks_ai_academia:hover a{ background: blue; color: white; }
May 6, 2016 at 2:39 am #628044Thank you, Josue!! This is excellent!
May 6, 2016 at 2:43 am #628045Last question: what if I want to change the color when I hover over the mail icon? And is there a directory of color names that can be used (so that I can be more selective in my colors)?
Thanks!
May 6, 2016 at 2:49 am #628047Also, is there any way to change the names that appear when I hover? (instead of ‘ai_research’ it should be ‘Research Gate’, and instead of ‘ai_googlescholar’ it should be ‘Google Scholar’
May 6, 2016 at 3:21 am #628049See my previous message regarding color.
For the titles, they come from the code in functions.php:
$icons['Ai Research'] = 'ai_research'; $icons['Ai GoogleScholar'] = 'ai_googlescholar'; $icons['Ai Academia'] = 'ai_academia';
Although you can simply change the “icon code” (
ai_research
,ai_academia
, etc) there, it may get messy because that will also be the class assigned to the HTML element (CSS classes can not have spaces), alternatively you could do the following:$icons['Ai Research'] = 'ResearchGate'; $icons['Ai GoogleScholar'] = 'GoogleScholar'; $icons['Ai Academia'] = 'Academia';
Once you done that you’d need to re-set the Social Icons in Theme Options and change the CSS codes:
.social_bookmarks_ai_research
becomes.social_bookmarks_ResearchGate
and so on.Makes sense?
May 6, 2016 at 4:23 pm #628374Hi there,
I made the changes you suggested to the functions.php file and it worked but now the icons aren’t showing up (I get a default pencil icon in place of the academia icons instead).I changed the CSS codes in the quick CSS, but maybe I didn’t reset the social icons properly? I tried deleting them and adding them but that didn’t help.
May 6, 2016 at 4:27 pm #628375Ah, never mind! I fixed it by also changing the style.css! Looks great now.
Thank you so much for your help!!
May 6, 2016 at 4:47 pm #628387One last quick question: Any way to increase the size (or boldness) of the academia icons (and not the other icons, which are fine as they are)?
Thanks!
May 6, 2016 at 5:16 pm #628398Hi,
Try with this:
#top .social_bookmarks li.social_bookmarks_ResearchGate a { font-size: 28px; }
Best regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.