-
AuthorPosts
-
June 19, 2014 at 2:16 pm #281199
Hi there,
i found this post:
https://kriesi.at/support/topic/share-icons-on-pages-and-portfolio-items/#post-260646I added the code to functions.php
The second code block works fine. But the first one, for standard pages, doesn’t work for me. I’ve got the newest enfold version.Question, is it possible, to add this code manually ? I dont want it at the end of the site, neighter on top. Can codeblock help? If yes, how?
ThxJune 20, 2014 at 11:34 am #281552Hi Mario!
Yes you can insert the code with a shortcode but you must install a plugin like: http://wordpress.org/plugins/shortcode-exec-php/ which enables you to embed php code into the page/post content. The code block can be used with the exec-php shortcode but it won’t execute the php code directly (without exec-php shortcode) because of security reasons. If you want to display the social icons just use this php code:
avia_social_share_links();
Best regards,
PeterJune 21, 2014 at 12:50 am #281833Hi there,
i installed this plugin. Used your code … but nothing happens.
One time i got it working but the rest of the page was broken (Avia Builder)
I want to use inside the portfoliopages …Another solution what help too. I only want to display the share icons at the single portfolio page and not on other pages.
- This reply was modified 10 years, 5 months ago by docperi.
June 21, 2014 at 7:55 am #281898Hi!
Please create me an admin account and post a link to the portfolio page where the social icons don’t display.
Regards,
PeterJune 21, 2014 at 11:01 am #281959This reply has been marked as private.June 21, 2014 at 3:10 pm #281977Hallo Dude. Ich bin von diesem Gedanken weg. Habe nur eine Bitte:
Ich habe die Enfold Social Navigation über die functions.php eingebunden.
Ist alles Prima. Ich möchte jedoch nur, dass sie im Portfolio-Detailseiten erscheint.
Ich bekomme das menü nicht von der Startseite weg. Wie kann ich das anstellen?ich verwende folgenden Code:
add_action('ava_after_content', 'avia_add_social_toolbar', 10, 2); function avia_add_social_toolbar($id = "", $context = "") { if($context == "single-portfolio") avia_social_share_links(); } add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1); function avia_add_social_toolbar_template_builder($content = "") { $content .= avia_social_share_links(array(), false); $content .= '<div style="height:1px; margin-top:50px;" class="hr"></div>'; return $content; }
- This reply was modified 10 years, 5 months ago by docperi.
June 22, 2014 at 6:16 am #282080Hi!
Thank you for the update.
From what I understand, you only want to show the share section on portfolio items. Is that correct? Try to use this:
add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1); function avia_add_social_toolbar_template_builder($content = "") { if(is_singular('portfolio')) { $content .= avia_social_share_links(array(), false); $content .= '<div style="height:1px; margin-top:50px;" class="hr"></div>'; } return $content; }
Regards,
IsmaelJune 22, 2014 at 4:03 pm #282163Sounds good. Just a simple question. Is it possible to place the social toolbar before instead after the content?
This would be nice :-)June 23, 2014 at 7:34 am #282283Hey!
Yes, use this code:
add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1); function avia_add_social_toolbar_template_builder($content = "") { if(is_singular('portfolio')) { $content = avia_social_share_links(array(), false) . $content; } return $content; }
Regards,
PeterJune 23, 2014 at 7:50 am #282285Hi!
Yes, that’s possible. Replace the code with this:
add_filter('avf_template_builder_content', 'avia_add_social_toolbar_template_builder', 10, 1); function avia_add_social_toolbar_template_builder($content = "") { if(is_singular('portfolio')) { $share = avia_social_share_links(array(), false); $hr = '<div style="height:1px; margin-top:50px;" class="hr"></div>'; $content = $share . $hr . $content; } return $content; }
Regards,
IsmaelJuly 15, 2014 at 7:05 pm #291762Hello,
I want to do same but where i have to insert Ismael’s code?
Regards
SergioJuly 15, 2014 at 7:25 pm #291772Hi Sergio!
You should put that at the very end of the theme (or child theme) functions.php file.
Regards,
JosueDecember 23, 2015 at 10:24 pm #557225Dear Kriesi,
This was working fine for me, but now for some reason (I updated WordPress and Enfold) the social share icons are appearing at the top of the page (rather than at the bottom as they were before) and overlap with the image and title at the top of my portfolio post, so that they cannot be clicked.
I am including a link below to a post on my website to show this.
How can I move them back to the bottom of the page?
Thanks, Richard
December 26, 2015 at 9:16 am #557438Hey!
Refer to:
https://kriesi.at/support/topic/share-snipet-placement-after-update-to-3-1-1/#post-416071Regards,
JosueDecember 28, 2015 at 5:13 pm #557769Thanks Josue
-
AuthorPosts
- The topic ‘Set Social Share Icons manually’ is closed to new replies.