Support » Plugin: Simple Share Buttons Adder » social button on homepage

  • maciekl

    (@maciekl)


    Hi there,

    I use SSBA with custom icons on my website http://www.creativegentleman.com . For some reason on my homepage facebook like and Google plus buttons are not linked to the specific posts but instead work as general like button to ma website. Could you please help me figure it out what cause this issue?

    regards

Viewing 1 replies (of 1 total)
  • I had this same problem with custom icons. I found this code in simple-share-buttons-adder/inc/ssba_buttons.php:

            // if running standard
            if ($booShortCode == FALSE) {
    
                // use wordpress functions for page/post details
                $urlCurrentPage = get_permalink($post->ID);
                $strPageTitle = get_the_title($post->ID);
    
            } else { // using shortcode
    
                // set page URL and title as set by user or get if needed
                $urlCurrentPage = (isset($atts['url']) ? $atts['url'] : ssba_current_url($atts));
                $strPageTitle = (isset($atts['title']) ? $atts['title'] : get_the_title());
            }

    I edited this to just use the first part of the if/else (i.e., $urlCurrentPage = get_permalink($post->ID); and $strPageTitle = get_the_title($post->ID);), and that seems to get what I needed.

Viewing 1 replies (of 1 total)
  • The topic ‘social button on homepage’ is closed to new replies.