Social Shate Buttons right after Post

WordPress Themes, Plugins and HTML Templates Forums Arcane WordPress Theme Social Shate Buttons right after Post

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #696
    marcwitt
    Participant

    I want to paste static social share buttons right after the post-content, between author box and content. Can you tell me the template file and the exact position where to paste the code?
    Thanks a lot!

    #1763
    admin
    Participant

    Hi,

    Please try Jetpack Sharing module. It will integrate sharing buttons just after the content.
    This is the reason, we love JetPack as it provides lot of features under one roof.

    Best,

    #1764
    marcwitt
    Participant

    Thanks for your reply. I want to make my blog faster and one aspect I want to change is the use of static share buttons. I am using jetpack, but don´t want to use the share buttons.

    Can you tell me the exact place, in which template to put my snippet fpr the static buttons to appear right aftter the post before the author box?

    #1765
    admin
    Participant

    Hi,

    You can place your snippet in the following file.

    arcane/template-parts/content-single.php

    Heads Up:

    It is not recommended to modify your theme files directly. You will lose your changes when the theme will be upgraded.
    I will recommend to modify the theme via Child Theme. So, you can easily upgrade your theme and your changes will not be lost.

    Best

    #1766
    marcwitt
    Participant

    Alright, I´m planning to use a use a child theme :)

    Could you tell me the exact line or place, in which to paste my social share button code? I´m only able to put it right under the title, but can´t find the right place to put it right after the content.

    #1767
    admin
    Participant

    Great to use Child theme :)
    You may find following code of content.

    [/CODE]

    You may place the code below that line.
    File: arcnae/template-parts/content-single.php
    Approximate Line Number: 26

    Thanks[CODE][/CODE]

    You may place the code below that line.
    File: arcnae/template-parts/content-single.php
    Approximate Line Number: 26

    Thanks

    #1768
    marcwitt
    Participant

    Thanks! But when I do that, only the header loads, not the content anymore,

    This is my code:

    Jetzt teilen: https://www.facebook.com/sharer/sharer.php?u= echo urlencode(get_permalink($post->ID)); ?>&t=” target=”blank” rel=”nofollow” style=”background:#3D62B3;color:#FFF;padding:1px 5px 1px 5px;font-size:95%”>Facebook http://graph.facebook.com/?ids=‘ . $URL); $json = json_decode($json_string, true); return intval( $json[$URL] );} ?> https://plusone.google.com/_/+1/confirm?hl=de&url= echo urlencode(get_permalink($post->ID)); ?>&title=” target=”blank” rel=”nofollow” style=”background:#D34836;color:#FFF;padding:1px 5px 1px 5px;font-size:95%”>Google+ https://clients6.google.com/rpc“); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt($curl, CURLOPT_POSTFIELDS, ‘[{“method”:”pos.plusones.get”,”id”:”p”,”params”:{“nolog”:true,”id”:”‘ . $url . ‘”,”source”:”widget”,”userId”:”@viewer”,”groupId”:”@self”},”jsonrpc”:”2.0″,”key”:”p”,”apiVersion”:”v1″}]’); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HTTPHEADER, array(‘Content-type: application/json’)); $curl_results = curl_exec ($curl); curl_close ($curl); $json = json_decode($curl_results, true); return intval( $json[0] );} ?>
    #1769
    admin
    Participant

    Please check your code snippet is working properly. You are using CURL in your code, is your hosting supporting it?

    #1770
    marcwitt
    Participant

    Well, the code itself works (s. here: https://bueronerds.de/brnrds/leben/kaffeetrinker-typen-kaffeejunkie-barista/) but only at the beginning of the content. Not at the end…

    #1771
    admin
    Participant

    If it is working in the beginning than it should work anywhere.
    I will again suggest you to use Jetpack social module or use any good social plugin to make your life easy :) There are lot of options in the WordPress repo.

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