Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #281199

    Hi there,
    i found this post:
    https://kriesi.at/support/topic/share-icons-on-pages-and-portfolio-items/#post-260646

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

    #281552

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

    #281833

    Hi 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, 6 months ago by docperi.
    #281898

    Hi!

    Please create me an admin account and post a link to the portfolio page where the social icons don’t display.

    Regards,
    Peter

    #281959
    This reply has been marked as private.
    #281977

    Hallo 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, 6 months ago by docperi.
    #282080

    Hi!

    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,
    Ismael

    #282163

    Sounds good. Just a simple question. Is it possible to place the social toolbar before instead after the content?
    This would be nice :-)

    #282283

    Hey!

    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,
    Peter

    #282285

    Hi!

    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,
    Ismael

    #291762

    Hello,
    I want to do same but where i have to insert Ismael’s code?
    Regards
    Sergio

    #291772

    Hi Sergio!

    You should put that at the very end of the theme (or child theme) functions.php file.

    Regards,
    Josue

    #557225

    Dear 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

    #557438
    #557769

    Thanks Josue

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Set Social Share Icons manually’ is closed to new replies.