-
AuthorPosts
-
June 8, 2021 at 9:20 am #1304576
Hi;
the newly in 4.8.3 introduced feature “ALB Social Share Buttons extended” seems to break custom changes via the avia_social_share_link_arguments filter.
Before the update, this code would add a xing share button to blog pages:
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=[permalink]&t=[title]"); return $args; }
I´ve already tried another approach, but it isn´t working either:
add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1); function avia_add_social_share_link_arguments($args) { $xing = array('xing' => array("encode"=>true, "encode_urls"=>false, "pattern" => "https://www.xing-share.com/app/user?op=share;sc_p=xing-share;url=[title]&url=[permalink]", 'label' => __("Teile auf Xing",'avia_framework'))); $args = array_merge($xing, $args); return $args; }
Additinally my code, which added the social share links to every single page, does no longer work:
add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1); function avia_add_social_toolbar_template_builder($content = "") { if (is_single()) { $content .= avia_social_share_links(array(), false, '', false); $content .= ''; } return $content; }
Is there a fix or workaround for this?
Regards
AnsgarJune 15, 2021 at 1:18 pm #1305808Hey Ansgar,
Thanks for contacting us and sorry for the late reply!
Could you please try replacing the content of /enfold/includes/helper-social-media.php file with this one – https://pastebin.com/DyEsUSNE in Appearance > Editor and check if that helps?
Best regards,
YigitJune 15, 2021 at 2:19 pm #1305821Hey!
Regarding the second filter, you might have to replace is_single with is_singular(“page”) and add this css code to adjust the width of the ul tag.
#top .av-share-box ul { width: 100%; }
Replace the snippet with this one.
function avia_add_social_toolbar_template_builder($content = "") { if (is_singular("page")) { $content .= avia_social_share_links(array(), false, '', false); $content .= ''; } return $content; } add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1);
Best regards,
IsmaelJune 30, 2021 at 11:53 am #1308089Hi!
@Yigit: Yes, it works after replacing the code, thanks!
Will this be fixed in future version or will i have to replace the code after updating?
@Ismael: Thank you! I now have the condition if is_single() OR is_singular(“page”), so that the share buttons get display both on blog posts and single pagesBest regards
AnsgarJune 30, 2021 at 11:55 am #1308091Hi Ansgar,
You are welcome! It will be included in upcoming version so you will not need to replace it again :)
Best regards,
YigitJune 30, 2021 at 12:12 pm #1308098Hi Yigit,
cool! 8-) Thank you for your awesome support!
Regards
AnsgarJune 30, 2021 at 12:17 pm #1308099Hi,
You are welcome, Ansgar! Always happy to help :)
For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)
Enjoy the rest of your day!
Best regards,
Yigit -
AuthorPosts
- The topic ‘Social Share Xing missing after Update to Enfold 4.8.3’ is closed to new replies.