WordPress.org

Ready to get started?Download WordPress

Forums

Social Media Feather
Sharing Post link broken with 1.3.0 (10 posts)

  1. mike@lilyrx.com
    Member
    Posted 1 year ago #

    It seems that with the latest version of Social Media Feather (1.3.0), the share buttons are sharing the wrong link. They used to share the permalink to a post, but now they share some bogus link.

    See the website here: http://lilyspharmacy.com/blog

    Notice that all of the share buttons at the bottom of each blog post share http://lilyspharmacy.com/blog/blog instead of the permalink (http://lilyspharmacy.com/blog/?p=123).

    This used to work fine with the previous version.

    Thanks,
    Mike

    http://wordpress.org/extend/plugins/social-media-feather/

  2. Synved
    Member
    Plugin Author

    Posted 1 year ago #

    It seems there's a small issue in the new URL code. Given you don't seem to be using single post links, I think selecting the "Use Full URL" option should temporarily take care of this.

  3. mike@lilyrx.com
    Member
    Posted 1 year ago #

    That doesn't seem to do it.

    I have tried "Share Full URL" option and I have also tried the "Display Sharing Buttons" to try and show the sharing buttons IN the post, along with the ones that I am embedding using PHP, and the URLs on both of them seem to still be wrong.

    Thanks,
    Mike

  4. Synved
    Member
    Plugin Author

    Posted 1 year ago #

    Ok given that I already had a few extra changes that required a release I put the fix for the URL bug above and pushed a new release. Could you try update to 1.3.1 and see if that fixes it? If you go the the Dashboard -> Updates page it should prompt you with the available update.

    By the way remember to uncheck the "Share Full URL" option.

  5. mike@lilyrx.com
    Member
    Posted 1 year ago #

    Thanks for the very quick update. It seems that the update fixed it when in my wordpress address (http://lilyspharmacy.com/wordpress) ...but when using my site address (http://lilyspharmacy.com/blog), the "in-post share buttons" and my PHP added share buttons are both still showing the incorrect http://lilyspharmacy.com/blog/blog link.

    Again - awesome quick-turn on the changes, but it still doesn't seem to have addressed it on my site address.

    Thanks,
    Mike

  6. Synved
    Member
    Plugin Author

    Posted 1 year ago #

    But is that /blog a WordPress site at all? Looking at the code it looks like some kind of custom template rather than a WordPress site.

  7. mike@lilyrx.com
    Member
    Posted 1 year ago #

    The /blog site is my template, using PHP and "The Loop" to embed blog postings into my site template. The loop code that I am using is as follows:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('../wordpress/wp-blog-header.php');
    ?>
    <?php
    $query = '';
    $offset=0;
    
    if (isset($_GET['offset'])){$offset=$_GET['offset'];}				
    
    if (!isset($_GET['p'])){
       $args = array(
    	'posts_per_page'  => 10,
    	'offset'          => $offset,
    	'category'        => '',
    	'orderby'         => 'post_date',
    	'order'           => 'DESC',
    	'include'         => '',
    	'exclude'         => '',
    	'meta_key'        => '',
    	'meta_value'      => '',
    	'post_type'       => 'post',
    	'post_mime_type'  => '',
    	'post_parent'     => '',
    	'post_status'     => 'publish',
    	'suppress_filters' => true );
    
    $posts = get_posts($args);
    }
    else{
            $posts = array(get_post($_GET['p']));
            if ($posts[0]==null){
    	        $posts = get_posts($args);
            }
    }
    
    foreach ($posts as $post) : start_wp(); ?>
    
    <div class="post_title"><?php the_title(); ?></div>
    <div class="post_date"><?php the_time(get_option('date_format')); ?> by <?php the_author(); ?></div>
    <div class="post_content"><?php the_content(); ?></div>
    
    <div class="post_social"><?php echo "Get Social with this Lily's Blog Entry:&nbsp;"; echo synved_social_share_markup(null,null,array('size'=>18)); ?></div>
    
    <?php
     endforeach;
    ?>
  8. Synved
    Member
    Plugin Author

    Posted 1 year ago #

    Unfortunately WordPress doesn't really support that, which is why it doesn't work.

    WordPress expects for permalinks to be the same so you can't share posts across sites with different URLs. If you were to output the_permalink() in your template, the same way you do the_title(), then it would also output the incorrect link.

  9. mike@lilyrx.com
    Member
    Posted 1 year ago #

    I do believe WordPress supports this - I got most of the code from wordpress online help.

    You will notice that when I output the_permalink() in my PHP loop, I do get the correct permalink. Notice on the http://lilyspharmacy.com/blog page, I have output the permalink right under the_title. Seems to be just right.

    Also, before the 1.3.0 version of social feather, it seemed to use the correct permalink in the share link, no problem...only after this upgrade have I seen the problem.

    Finally, you will also notice that the share permalink is incorrect in both the social feather icons that I am adding with the echo synved_social_share_markup(null,null,array('size'=>18)); and in the icons that are automatically added to the end of the each blog entry.

    Is there any way I can go back to version before 1.3.0?

  10. Synved
    Member
    Plugin Author

    Posted 1 year ago #

    Ok I can see that you are using the Loop incorrectly. Try changing your get_posts call to:

    query_posts($args);

    and foreach loop to something like this:

    while (have_posts()) : the_post();
    endwhile;

    Taken from the WordPress documentation. Further reading:
    http://codex.wordpress.org/The_Loop#Multiple_Loops

    By the way, if you really really want to, you can get older versions from the Developers page:
    http://wordpress.org/plugins/social-media-feather/developers/

    I highly discourage using old versions though, as those are NOT supported in any way.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.