Support » Plugins and Hacks » Sociable plugin: only on front page link

Sociable plugin: only on front page link

  • Hi,
    I’m using the Sociable plugin (http://yoast.com/wordpress/sociable/) on my site at http://doodlebug.josephlavington.com.

    I only want it on the front page (not on posts), which I currently have implemented using the PHP snippet in my sidebar:

    <?php if (function_exists('sociable_html')) {
      echo sociable_html();
    } ?>

    However the link it gives is the second from latest entry. Partly I think this is because i’m using multiple loops and something is wrong (i’m trying to fix it).

    But I don’t want it to be a link to a post (latest or not) anyway, but to the actual main blog URL – or is this not something it can do?

Viewing 2 replies - 1 through 2 (of 2 total)
    1. Open sociable.php in wp-content/plugins/sociable
    2. Find the line, somewhere around line 673, that reads: $permalink = urlencode(get_permalink($post->ID));
    3. Change that line to read: $permalink = urlencode(get_option('siteurl'));

    All your links will now be to the base URL of your blog.

    Note, however, that linking your bookmarks to your blog’s base URL will likely cause your bookmarks to be rejected by many providers (such as Digg) or reported by other users.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sociable plugin: only on front page link’ is closed to new replies.