The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Sociable plugin: only on front page link (3 posts)

  1. Doodlebug
    Posted 8 years ago #

    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?

  2. dhvrm
    Posted 8 years ago #

    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.

  3. dhvrm
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic