Title: Wrong URL
Last modified: August 24, 2016

---

# Wrong URL

 *  [breathelifein](https://wordpress.org/support/users/biellebrunner/)
 * (@biellebrunner)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/wrong-url-6/)
 * When I share a post from the home page, it get’s the title of the post right,
   but not the url. It’s referring to the home page url, and not of the individual
   post.
    Is there a way to fix this?
 * [https://wordpress.org/plugins/simple-share-buttons-adder/](https://wordpress.org/plugins/simple-share-buttons-adder/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [andy_woz](https://wordpress.org/support/users/andy_woz/)
 * (@andy_woz)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wrong-url-6/#post-6138544)
 * I have this issue too. On any kind of archive or category page with multiple 
   posts the shared url is not the url of the individual post in the loop but the
   url of the main page.
 * Any Ideas anyone? Single pages are ok.
 *  [andy_woz](https://wordpress.org/support/users/andy_woz/)
 * (@andy_woz)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/wrong-url-6/#post-6138545)
 * Found this thread:
    [https://wordpress.org/support/topic/share-buttons-not-sharing-the-specific-post-url?replies=6](https://wordpress.org/support/topic/share-buttons-not-sharing-the-specific-post-url?replies=6)
 * The code has moved to a block that starts at line 84 in 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());
   
               }
       ```
   
 * If you change the //using shortcode methods of getting the URL to the standard
   method that’s in the block above it seems to fix it. Wondering if David has any
   input on this? Is it something to do with the way the posts are being queried
   in my theme? I’m also pulling ssba directly via do_shortcode() in the template

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Wrong URL’ is closed to new replies.

 * ![](https://ps.w.org/simple-share-buttons-adder/assets/icon-256x256.png?rev=2661516)
 * [Simple Share Buttons Adder](https://wordpress.org/plugins/simple-share-buttons-adder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-share-buttons-adder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-share-buttons-adder/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-share-buttons-adder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-share-buttons-adder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-share-buttons-adder/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [andy_woz](https://wordpress.org/support/users/andy_woz/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/wrong-url-6/#post-6138545)
 * Status: not resolved