Tagged: child theme
-
AuthorPosts
-
February 8, 2016 at 8:42 pm #579878
I have directory in my child theme for “includes” and inside I have
helper-main-menu.php
to make some tweaks there. Works find. I am trying to do the same withhelper-social-media.php
but it does not look like that file is being recognized. ( I am trying to add some prefix text to the social bookmark links )February 9, 2016 at 3:10 am #580021Hi thatryan!
What’s the exact change your trying to do?
Best regards,
ElliottFebruary 9, 2016 at 3:21 am #580030in
thmes/child-theme/includes/helper-social-media.php
in thebuild_icon()
function, around line 82,$html = ""; $html .= "<".$this->args['inside']." class='".$this->args['class']."_".$icon['social_icon']." av-social-link-".$icon['social_icon']." social_icon_".$this->counter."'>"; $html .= "<a {$blank} href='".$icon['social_icon_link']."' ".av_icon_string($icon['social_icon'])." title='".ucfirst($icon['social_icon'])."'><span class='avia_hidden_link_text'>".ucfirst($icon['social_icon'])."</span></a>"; $html .= "</".$this->args['inside'].">"; return $html;
I am trying to add a span and some text right before the
<ul>
gets output.$html = ""; $html .= "<span>Follow Us: </span>";
February 9, 2016 at 10:30 am #580251Hey!
Are you trying to make these changes from Appearance > Editor > functions.php
If so make sure the folder and file has writable permission set on it as well.
for more info please check https://codex.wordpress.org/Changing_File_Permissions
Another alternative is to make changes via FTP and upload the file to server.
Cheers!
Vinay Kashyap- This reply was modified 8 years, 10 months ago by Vinay.
February 9, 2016 at 7:19 pm #580523No I am changing it in my child theme via sFTP.
Same way I have done everything else, so it is not a permissions issue.February 11, 2016 at 8:48 am #581492Hey!
I’m sorry but you can’t override a helper function inside a child theme. The override will only work for template files such as the header.php, loops, templates etc. If you really need to do this in a child theme, copy the whole “avia_social_media_icons” class in the functions.php. Or use javascript / jQuery.
Best regards,
IsmaelMarch 20, 2019 at 9:01 am #1080721Hi Ismael,
I’m also trying to override a helper php file in my child theme. How can I make sure the file in child the overrides the parent enfold version? I found a post that refers to putting something in functions.php?
Best regards,
MatthijsMarch 21, 2019 at 9:40 am #1081283 -
AuthorPosts
- You must be logged in to reply to this topic.