Viewing 30 posts - 1 through 30 (of 36 total)
  • Author
    Posts
  • #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,
    Sabine

    #622705

    Hi 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,
    Rikard

    #622727

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

    #622741

    Hi!

    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&#8221; />
    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,
    Basilis

    #622762

    When 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)?

    #622766

    I am not sure where to find the header file within the child theme folder.

    #622774

    I’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!

    #622789

    Hi!

    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,
    Vinay

    #623261

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

    #623879

    Hi, any update?

    #624649

    Hi again,
    Can you let me know if you are working on this? Thanks!

    #624966

    Hi,

    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,
    Josue

    #625072

    I’m sending the info so that you can use an FTP account to do this. Let me know if you need anything else – thanks!

    #625148

    Hi,

    It does connect but i’m greeted with an empty directory – http://screencast.com/t/VC2PZnPcCb

    Best regards,
    Josue

    #625213

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

    #625872

    Hello again, just checking in on the status of this request. How is it going?

    #626525

    Hi,

    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&#8221; and “https://link.com/ResearchGate&#8221;

    //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,
    Vinnie

    #627591

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

    #627863

    Hey!

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

    #627874

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

    #628042

    Done, the 3 new custom icons has been added:
    http://sabinedoebel.com/wp-admin/admin.php?page=avia#goto_social

    To 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.1461188191

    Regards,
    Josue

    #628043

    Also, 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;
    }
    #628044

    Thank you, Josue!! This is excellent!

    #628045

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

    #628047

    Also, 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’

    #628049

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

    #628374

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

    #628375

    Ah, never mind! I fixed it by also changing the style.css! Looks great now.

    Thank you so much for your help!!

    #628387

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

    #628398

    Hi,

    Try with this:

    #top .social_bookmarks li.social_bookmarks_ResearchGate  a {
        font-size: 28px;
    }
    

    Best regards,
    Josue

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