WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Sociable] Not insert in excerpts? (9 posts)

  1. stormymondays
    Member
    Posted 4 years ago #

    I was wondering if there's a way to exclude inserting Sociable when showing post excerpts.

    I have a slightly complex configuration. My front page is powered by WordPress and shows a post extract, but the actual blog is in a subdirectory. If I check the "Front page of the blog" option, it shows on both the front page (where I don't want it) and the blog.

    I've solved it by adding Sociable manually into the index.php template, but if I had an option to disable Sociable for post extracts, that would do it for me :)

    http://wordpress.org/extend/plugins/sociable/

  2. sociable
    Member
    Posted 4 years ago #

    stormymondays: Would you please explain a little further or send us screenshot(s) or a URL to check? Regards.

  3. stormymondays
    Member
    Posted 4 years ago #

    Sorry, it's a complex issue. Some URLs will hopefully explain it:

    Home page: http://www.stormymondays.com/
    Actual blog: http://www.stormymondays.com/rainydays/

    It's a WordPress page that also has an extract from the latest post blog on the right column. It's created with the_excerpt();

    If I activate Sociable for the home page, the sociable icons get added to the excerpt in the home page, which I don't want. If I don't, the icons don't get added to the actual blog.

    I was thinking that the solution would be to have Sociable add its icons only to full posts and not to excerpts.

    Am I making sense now?

  4. sociable
    Member
    Posted 4 years ago #

    stormymondays: Can you explain to us a little bit more how you're generating the homepage with the excerpt function? Regards

  5. stormymondays
    Member
    Posted 4 years ago #

    I'm creating another loop outside of the WordPress loop.

    The second loop uses query_posts to get the post that I want, and then it's just the_title, the_excerpt and the_permalink.

  6. sociable
    Member
    Posted 4 years ago #

    stormymondays:
    Try commenting this line (#915) on sociable.php so it doesn't hooks with the excerpt:

    add_filter('the_excerpt', 'sociable_display_hook');

    Regards.

  7. stormymondays
    Member
    Posted 4 years ago #

    Thanks. It would be great if instead of hacking the script, you could add it as an option to a future release. :)

  8. sociable
    Member
    Posted 4 years ago #

    stormymondays: We'll take note of your suggestion :-) Thanks!

  9. acafourek
    Member
    Posted 4 years ago #

    I second the recommendation to make this configurable... I'm using the excerpt for meta descriptions and it took me forever to figure out why I was seeing 2 sociable sets on one page! But thanks for posting the answer here, its just what I needed.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags