Support » Plugins » Sociable WP Category archive

  • I’ve installed the Sociable plugin on my WP blog and find it to be the best of its kind. There is an issue I would like some help with, however.

    On the WP Admin page, I have set the plugin’s Position field to “Individual blog posts” only. Then, on each of my Category archives, I have placed the following code where I want Sociable to appear:

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

    My reasoning for this is that when I had the plugin Position also set to “Category archives,” it would place Sociable under each entry. This was obviously cluttered and not how I wanted it to act so I removed it. You can see an example of these pages here:

    The plugin is working on the Category pages, but it’s linking to the latest post instead of the archive appears on. Is there a way I can correct this without affecting the link it displays on each individual blog post?

    Thanks for your help,
    Jeff Tovar

Viewing 2 replies - 1 through 2 (of 2 total)
  • Anyone?

    It looks like you have set the Sociable code outside of the loop in your category.php or page.php file.

    So when it is called, it is by default going to the latest post.

    It needs to be called within the loop of your category file in order for it to pick up each story properly.

    Something like this:

    <!-- loop -->
    <?php if (have_posts()) :?>
    <?php $postCount=0; ?>
    <?php while (have_posts()) : the_post();?>
    --Your story content code goes here--
    <?php if (function_exists('sociable_html')) {echo sociable_html(); } ?>

    Reverse the last two lines if you want the Sociable links to appear above the story content.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sociable WP Category archive’ is closed to new replies.