WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Mystique - TweetMeMe doesn't work with Featured Posts. (9 posts)

  1. pkoury
    Member
    Posted 4 years ago #

    When I turn on the featured posts option in the Mystique theme, the TweetMeMe buttons disappear. When I turn it off, the buttons come back.

    Any idea why this might be or how to correct it?

    I am using the latest versions of everything as of today.

  2. pkoury
    Member
    Posted 4 years ago #

    Anyone?

  3. digitalnature
    Member
    Posted 4 years ago #

    you can't make it work unless you turn off featured posts.
    this because of bad plugin coding.

    more exactly, the plugin author hooks his function on "the_content()" without making sure the_content() is called within the main loop & not on other stuff (like the featured posts in this case)...

    if you know php I could tell you how to fix this, you'll need to edit the plugin code.

  4. pkoury
    Member
    Posted 4 years ago #

    I'm willing to give it a shot if you are. I have done some pretty advanced stuff and I'm pretty good at following directions. :)

  5. digitalnature
    Member
    Posted 4 years ago #

    open tweetmeme.php and replace
    add_filter('the_content', 'tm_update');
    with:
    add_filter('the_content', 'tm_update', 8);

  6. pkoury
    Member
    Posted 4 years ago #

    Wow, that works.

    Why does adding the '8' make a difference? I am going to report this to TweetMeMe.

  7. digitalnature
    Member
    Posted 4 years ago #

    8 is the priority for the hooked function.
    you need that so the filter is added before get_the_excerpt calls the_content.

  8. pkoury
    Member
    Posted 4 years ago #

    Thanks a bunch. I have notified TweetMeMe. Awesome support!

  9. pkoury
    Member
    Posted 4 years ago #

    TweetMeMe released an official update today correcting this problem!

Topic Closed

This topic has been closed to new replies.

About this Topic