Tagged: child theme, header, social
-
AuthorPosts
-
February 10, 2014 at 12:02 pm #221647
Secondly the moment I add this code and put a function.php in the child theme folder my site goes down. Below is everything in the functions.php When I added this, the site went down completely and I had to delete it to get the site back up. I did not edit the register-admin-options.php yet.
This tells me that there is either bad code here or that I am applying it incorrectly. Per my understanding, the purpose of the child functions.php is to be applied “in addition to” the parent functions.php. I need to know of I did this incorrectly below or if there is perhaps some bad code there.
I’m really out of ideas here guys. I’m going on two weeks now. Urgent.
Thanks for your help, Jas
<?php /* * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. */ /*Apple*/ add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); function avia_add_custom_icon($icons) { $icons['apple'] = array( 'font' =>'social-fontello', 'icon' => 'ue803'); return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1); function avia_add_custom_social_icon($icons) { $icons['Apple'] = 'apple'; return $icons; } /*Yelp*/ add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); function avia_add_custom_icon($icons) { $icons['yelp'] = array( 'font' =>'social-fontello', 'icon' => 'ue800'); return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1); function avia_add_custom_social_icon($icons) { $icons['Yelp'] = 'yelp'; return $icons; }
February 11, 2014 at 12:59 am #221953This reply has been marked as private.February 13, 2014 at 11:04 am #223326Hi!
You mus not duplicate the function because function names must be unique – use following code instead:
add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); function avia_add_custom_icon($icons) { $icons['apple'] = array( 'font' =>'social-fontello', 'icon' => 'ue803'); $icons['yelp'] = array( 'font' =>'social-fontello', 'icon' => 'ue800'); return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1); function avia_add_custom_social_icon($icons) { $icons['Apple'] = 'apple'; $icons['Yelp'] = 'yelp'; return $icons; }
Cheers!
PeterFebruary 13, 2014 at 11:07 am #223330Thank you I’ll try it and get right back to you, Jas
February 13, 2014 at 11:30 am #223337Thank you!
For those users who may be confused, register-admin-options.php does NOT need to be edited to achieve an icon change in the header. As you can see in my post here http://goo.gl/zwuPVa understanding this can be a bit confusing.
Directions are:
1. Go to fontello.com and download fonts via a zip file
2. Add fonts to Enfold theme
3. Edit functions.phpThat’s it.
Thank you for all your help! Case closed, Jas
-
AuthorPosts
- The topic ‘Head With Social Media and Large Logo’ is closed to new replies.