Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1108012

    Hello,

    I’ve followed the directions to add two new icons to Social Profiles, Yelp and TripAdvisor, but when I add the code to the Child’s function.php, the site crashes after a few minutes. After I add the code, the WP message says the message was saved with the green checkbox. Luckily I saved a backup prior to adding everything so I just revert back to the starting point, but I’m perplexed why the site is doing this.

    Enfold Child
    Version 4.5.7
    I also properly added the two icons (Font: Fontello) into Theme Options > Import/Export (should I have done this even though the icons are already installed by default?)

    Here’s the code that I added to Appearance > Theme Editor > functions.php

    Yelp
    // Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    $icons[‘yelp’] = array( ‘font’ =>’fontello’, ‘icon’ => ‘uf1e9’);
    return $icons;
    }
    add_filter(‘avf_default_icons’,’avia_add_custom_icon’, 10, 1);

    // Add new icon as an option for social icons
    function avia_add_custom_social_icon($icons) {
    $icons[‘Yelp’] = ‘yelp’;
    return $icons;
    }
    add_filter(‘avf_social_icons_options’,’avia_add_custom_social_icon’, 10, 1);

    TripAdvisor
    // Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    $icons[‘tripadvisor’] = array( ‘font’ =>’fontello’, ‘icon’ => ‘uf262’);
    return $icons;
    }
    add_filter(‘avf_default_icons’,’avia_add_custom_icon’, 10, 1);

    // Add new icon as an option for social icons
    function avia_add_custom_social_icon($icons) {
    $icons[‘TripAdvisor’] = ‘TripAdvisor’;
    return $icons;
    }
    add_filter(‘avf_social_icons_options’,’avia_add_custom_social_icon’, 10, 1);

    Prior to the site crashing, the names never appeared in Social Profiles. Here’s the message I received once it did crash. Once I saw this after the third time, I reinstalled the backup again and decided to reach out.
    Technical Difficulties

    Logins are below. Thanks for your time!

    #1108062

    I figured out why it didn’t work. I remembered Mike mentioning in another thread to make sure the apostrophe’s need to be straight. Mine were curly. After updating the apostrophe’s, the Yelp code worked, but the TripAdvisor code did not. It crashed the site like before.

    Still need help to add TripAdvisor. Thanks

    #1108500

    Hi,
    Sorry for the late reply, I have taken a look at your site and since it has been crashing, please include FTP access in the Private Content area, so we can try to install this for you.

    Best regards,
    Mike

    #1108503

    Yeah, I tried again this morning and it crashed again. Can’t figure it out, so thanks Mike!

    #1108508

    Hi,
    Sorry I’m not able to login with this ftp info, please check.

    Best regards,
    Mike

    #1108510

    See below

    #1108519

    Hi,
    Please see below.

    Best regards,
    Mike

    #1109914

    Hi,

    I need also TripAdvisor icons in Social Profiles.

    Can you help me about it?

    BR.

    #1110189

    Hi mierabt,

    Please open a new thread and include WordPress admin login details in private so that we can have a closer look at your site.

    Best regards,
    Rikard

    #1111891

    Hello Rikard,

    Thank for your reply.

    I opened new thread, case number #1111360. Please help me about it.

    Thank you.

    #1111904

    First : use the code tag to post code here on board. Then we can see if you are using correct Brackets, Quotationmarks etc. pp.
    And: it can be copy/pasted to proove or to insert it where you like.
    Second : A function name should be always unique in your functions.php ! : with your code on top, you violated that rule.
    (But on newer WP Versions the site should crash – it has some warnings on the bottom and does not save the changings – so ? )

    you can shorten your code above to:

    // Register new icon as a theme icon
    function avia_add_custom_icon($icons) {
    	$icons['yelp'] = array( 'font' =>'fontello', 'icon' => 'uf1e9');
    	$icons['tripadvisor'] = array( 'font' =>'fontello', 'icon' => 'uf262');
    return $icons;
    }
    add_filter('avf_default_icons','avia_add_custom_icon', 10, 1);
    
    // Add new icon as an option for social icons
    function avia_add_custom_social_icon($icons) {
    	$icons['Yelp'] = 'yelp';
    	$icons['TripAdvisor'] = 'TripAdvisor';
    return $icons;
    }
    add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);

    your font is named really : fontello ? – so you didn’t enter on top of fontello site a font-name?

    #1111961

    Hey Geunni007,

    Thanks for taking the time to post this but I think Mike has already taken care of adding the TripAdvisor icon to the site. Sorry to have wasted your valuable time on this but I just checked the site and it’s appearing in the list of icons, so this thread can be closed.

    #1112067

    Hi eskitaco,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1112282

    But the hint with the double function name can still be internalized, right?
    Especially because some of the snippets offered here often have the name: ava_custom_script

    #1112443

    Hi,

    Thank u for the tip! Those always perfect ;)

    Best regards,
    Basilis

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