Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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.
    #378420

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

    #381405

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

    #381537

    Hey!

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

    #381558

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

    #381939

    Hi!

    Can you paste the avia_social_share_link_arguments filter code you are using so i can test it on my install?

    Best regards,
    Josue

    #382026

    add_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;
    }

    #382055

    I see, i’ll suggest the idea to Kriesi.

    Thanks,
    Josue

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