-
AuthorPosts
-
March 5, 2021 at 2:21 pm #1285745
Hello,
I would like to add the social share icon tripadvisor (just like yelp). I imported it and I can use it when adding an icon. But it won’t show up in the social share row to be activated in the ALB. (Neither I can activate it in the secondary menu header)
How can I activate it?
Thank you so much for your help I tried so many things but I did not succeed yet.
Regards, Verena
March 5, 2021 at 3:13 pm #1285783Hey Verena,
Thanks for contacting us!
Please see – https://kriesi.at/documentation/enfold/social-share-buttons/#how-to-add-custom-social-icons-to-enfold-options. If that does not help, please create temporary admin logins and post them here privately so we can look into it :)
Best regards,
YigitMarch 5, 2021 at 8:02 pm #1285912Hello Yigit,
thank you for the quick response. Unfortunately I don’t know how to do it so I would appreciate if you could help me here. Attached you find the credentials of my website.
To be honest I found the documentations before but I don’t know where to insert the code and where to add the icons name and so on.Thank you for your effort
Regards, VerenaMarch 5, 2021 at 10:28 pm #1285935Hi Verena,
I added following code to functions.php file of your child theme
// Register tripadvisor icon as a theme icon function avia_add_custom_icon($icons) { $icons['tripadvisor_icon'] = array( 'font' =>'tripadvisor', 'icon' => 'uf262'); return $icons; } add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); // Add new icon as an option for social icons function avia_add_custom_social_icon($icons) { $icons['Tripadvisor'] = 'tripadvisor_icon'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1);
and chose Tripadvisor in Enfold theme options > Social Profiles.
Please review your website :)
Best regards,
YigitMarch 6, 2021 at 3:15 pm #1286073Many thanks Yigit!
It works perfectly now in the secondary menu but it still doesnt show up in the social share grid…can you help me with that as well? We would like to use it for sharing us not only on yelp but on Tripadvisor too.
Thanks again
VerenaMarch 9, 2021 at 12:59 pm #1286690Hi Verena,
Could you please try adding following code to Functions.php file as well
//Add items on the social share section add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1); function avia_add_social_share_link_arguments($args) { $new_array = array( 'tripadvisor_icon' => array( "encode"=>true, "encode_urls"=>false, "pattern" => "https://www.tripadvisor.com://send?text=[title]-[permalink]" ) ); return array_merge($new_array, $args); }
Best regards,
YigitMarch 9, 2021 at 1:43 pm #1286706Hey Yigit,
thank you very much for your help. It works perfectly! Just one last question: is there a possibility to change the name “tripadvisor_icon” without cancelling the icon? I tried it by just erasing the _icon part in the code but then the icon disappears ;-)
It would be perfect if there was just the name Tripadvisor when hovering over the icon, just like it is with Facebook. Is this possible?Thanks again,
VerenaMarch 9, 2021 at 2:26 pm #1286736Hi Verena,
Your code in functions.php file should be looking as following at the moment
// Register tripadvisor icon as a theme icon function avia_add_custom_icon($icons) { $icons['tripadvisor_icon'] = array( 'font' =>'tripadvisor', 'icon' => 'uf262'); return $icons; } add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); // Add new icon as an option for social icons function avia_add_custom_social_icon($icons) { $icons['Tripadvisor'] = 'tripadvisor_icon'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1); //Add items on the social share section add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1); function avia_add_social_share_link_arguments($args) { $new_array = array( 'tripadvisor_icon' => array( "encode"=>true, "encode_urls"=>false, "pattern" => "https://www.tripadvisor.com://send?text=[title]-[permalink]" ) ); return array_merge($new_array, $args); }
Please change it to following one
// Register tripadvisor icon as a theme icon function avia_add_custom_icon($icons) { $icons['Tripadvisor'] = array( 'font' =>'tripadvisor', 'icon' => 'uf262'); return $icons; } add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); // Add new icon as an option for social icons function avia_add_custom_social_icon($icons) { $icons['Tripadvisor'] = 'Tripadvisor'; return $icons; } add_filter('avf_social_icons_options','avia_add_custom_social_icon', 10, 1); //Add items on the social share section add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1); function avia_add_social_share_link_arguments($args) { $new_array = array( 'Tripadvisor' => array( "encode"=>true, "encode_urls"=>false, "pattern" => "https://www.tripadvisor.com://send?text=[title]-[permalink]" ) ); return array_merge($new_array, $args); }
After that you may need to reset Tripadvisor icon in Enfold theme options > Social Profile.
If you only need to add Tripadvisor icon to social share and not social profiles, you can use the code as following
// Register tripadvisor icon as a theme icon function avia_add_custom_icon($icons) { $icons['Tripadvisor'] = array( 'font' =>'tripadvisor', 'icon' => 'uf262'); return $icons; } add_filter('avf_default_icons','avia_add_custom_icon', 10, 1); //Add items on the social share section add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1); function avia_add_social_share_link_arguments($args) { $new_array = array( 'Tripadvisor' => array( "encode"=>true, "encode_urls"=>false, "pattern" => "https://www.tripadvisor.com://send?text=[title]-[permalink]" ) ); return array_merge($new_array, $args); }
Best regards,
YigitMarch 9, 2021 at 8:34 pm #1286901Hello Yigit,
that did not work out unfortunately, I always get a syntax error when adding the codes you sent me. I did exactly what you told me but it didn’t work out.
Regards,
VerenaMarch 9, 2021 at 9:09 pm #1286916Hi Verena,
I applied the changes for you. Please review your website :)
Best regards,
YigitMarch 9, 2021 at 10:16 pm #1286930Hello Yigit
you are the best :) thank you very much.
Just one more question: How can I change the background color when hovering over the social share icon tripadvisor? I tried to figure it out and change it by myself but I could not find the right selector. I would like to the add the color #33E0A0 and the owl icon should turn into #000000 instead of white.
Can you tell me how this is working? :) So many questions….
Thx, Verena
March 10, 2021 at 12:13 pm #1287057Hi Verena,
I added following code to bottom of Quick CSS field
.av-share-box ul li.av-social-link-Tripadvisor a:hover { background-color: #33E0A0; color: #000; }
Please review your website :)
Best regards,
YigitMarch 18, 2021 at 11:55 pm #1289063Hey Yigit,
thank you so much. Everything is working perfectly now.
You can close this one
Regards, Verena
March 19, 2021 at 3:11 am #1289073Hi,
I’m glad this was resolved. If you need additional help please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Tripadvisor as social share Icon’ is closed to new replies.