-
AuthorPosts
-
January 9, 2015 at 10:16 pm #377621
Hello,
I had to add a new social share icon for a client using the avia_social_share_link_arguments filter. The customer wants to have this new share icon in front of all the others. Therefore I changed the merge order in helper-social-media.php from$this->args = array_merge($default_arguments, apply_filters( ‘avia_social_share_link_arguments’, $args));
to
$this->args = array_merge( apply_filters( ‘avia_social_share_link_arguments’, $args), $default_arguments);
This works perfect as long as I do it in the parent theme. But if I put the helper-social-media.php file into the child it does not work. However the child is working well and some customizations in helper-main-menu.php show up just fine.
It looks like for any reason helper-social-media.php wont be read from a child. Any idea why?
PS.:
I just renamed the file in the parent with helper-social-media.php present in the child theme and got:
Fatal error: require_once() [function.require]: Failed opening required ‘includes/helper-social-media.php’ (include_path=’.:/usr/lib/php5′) in /var/www/wp-content/themes/enfold/functions.php on line 390
If i do the same with the file helper-main-menu.php i get nor error as long as the file is present in the child theme. Sounds to me like an evidence that helper-social-media.php is ignored in childthemes.- This topic was modified 9 years, 10 months ago by mensmaximus.
January 12, 2015 at 6:02 pm #378420Hi Michael!
That is not a WordPress template file so the child theme will not read it.
Instead what you’ll want to do is this, https://kriesi.at/support/topic/use-different-social-icons/#post-251970, and then you can select your new icon to use in Dashboard > Enfold > Social Profiles.
Regards,
ElliottJanuary 18, 2015 at 10:09 am #381405Thank you for your answer. But I talk about the social share buttons on blog posts and not about the social profiles in the header/footer.
January 18, 2015 at 10:37 pm #381537Hey!
If you want to have this mod in your child theme i think it would be best to copy the whole
avia_social_share_links
class into your child functions.php.Cheers!
JosueJanuary 19, 2015 at 3:02 am #381558I dont think this is a good idea. I guess many users would like to have the option to display social share icons in a custom order. So why dont you introduce such an enhancemnet?
January 19, 2015 at 5:43 pm #381939Hi!
Can you paste the
avia_social_share_link_arguments
filter code you are using so i can test it on my install?Best regards,
JosueJanuary 19, 2015 at 7:08 pm #382026add_filter(‘avia_social_share_link_arguments’, ‘avia_add_social_share_link_arguments’, 10, 1);
function avia_add_social_share_link_arguments($args) {
$args[‘xing’] = array(“encode”=>true, “encode_urls”=>false, “pattern” => “https://www.xing.com/social_plugins/share/new?h=1&url=%5Bpermalink%5D&t=%5Btitle%5D”);
return $args;
}January 19, 2015 at 7:47 pm #382055I see, i’ll suggest the idea to Kriesi.
Thanks,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.