• Resolved Michael D

    (@michael-divine)


    I added the share code like this:
    <?php echo do_shortcode('[ssba-buttons]'); ?>

    It is within the loop for each post displayed on the main blog page. When I click the Facebook icon, it shares only the whole page, not the individual post. It does not grab the image or title for the post I want to share. It does work if I choose locations -> posts at which point it is automatically added. However, it isn’t placed where I want it. When I add it to the index.php blog template, it no longer works. What’s up with that? How can I fix that?

    the page in question is here:
    https://www.tenthousandvisions.com/about-me-michael-divine/blog/

    The share buttons at the top of each post are added via the page template using the do_shortcode. The share buttons at the bottom of each post are added via the plugin itself.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Simple Share

    (@davidoffneal)

    @michael-divine If you’re going to add the buttons manually to a custom loop you have to make sure to provide the “url” and “title” attributes to the shortcode:

    [ssba-buttons url=”url” title=”title”]

    Depending on your loop the php would look roughly like this:

    <?php
    $url = the_permalink();
    $title = the_title();

    echo do_shortcode( ‘[ssba-buttons url=”‘ . $url . ‘” title=”‘ . $title . ‘”]’ );
    ?>

    Let me know if this helps. Thanks!

    Plugin Author Simple Share

    (@davidoffneal)

    Please feel free to reach out for any other concerns.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Facebook doesn’t work on Index.php for manually added sharer’ is closed to new replies.