Post thumbnails for Sitewide Tags

Post thumbnails for Sitewide Tags

Andrea & I have had several requests to add post thumbnails to Sitewide Tags. A couple months ago, Christine, emailed me an implementation she had done to get it working. I hadn't had time to look into it until yesterday. I checked in a variation on what Christine had done earlier today. You can download the development version to test it.

There is a checkbox in the sitewide tags options in network options to turn on the thumbnail support. If the thumbnails do not show in your tags blog, you may need to add the template tag to the theme

<?php the_post_thumbnail(); ?>

I did not test with MU 2.9.X, but I suspect this will only work in WordPress 3.0 or higher.

  • Adam W. Warner
    Posted at 13:15h, 27 October Reply

    Can we see a screenshot of the output?

  • Kevin
    Posted at 20:30h, 27 October Reply

    We had to quit using Sitewide Tags because of a bug in core. switchtoblog doesn’t fully change contexts, so any plugin that does some action on post like TwitterTools sending tweets or Subscribe2 sending email would double send for every post.

    Core team refused to address the issue and there’s nothing the plugin developers can really do because of the broken function in core.

    • Ron
      Posted at 11:42h, 28 October Reply

      “there’s nothing the plugin developers can really do because of the broken function in core”

      There is an action hook ‘switch_blog’ that can be used to do additional functions/checks on switch to blog. It is not possible for core to completely change blog/site context. The following things cannot be done:

      – remove functions
      – remove classes
      – change the value of defined constants

      Those are all limitations of PHP.

      Finally, any plugin can be coded so that it behaves in a desired manner when WP core is switched to another site. I’ll put writing a tutorial for that on our editorial calendar.

      • Kevin
        Posted at 09:39h, 29 October Reply

        “Finally, any plugin can be coded so that it behaves in a desired manner when WP core is switched to another site. I’ll put writing a tutorial for that on our editorial calendar.”

        Thanks Ron. That will at least give us something to point plugin developers to. Unfortunately, you and I know all too well that only a fraction of plugin authors care about multisite stuff, even now. And really, they shouldn’t have to. Behaviors like this should be transparent to individual plugins. A plugin should be able to say “Do X” and not have to worry about single or multisite.

        I still firmly believe that this is something that needs to be addressed at the core level or in the plugin that causes the context switch (like sitewide tags) instead of expecting every plugin out there to accommodate the problem.

  • More plugins releases soon
    Posted at 12:43h, 01 November Reply

    […] Tags is almost ready for a new release. Ron added thumbnail support last week, and I checked in code last weekend to fill in the tags page with posts made before the […]

  • Updates for WP Super Cache, Domain Mapping, Sitewide Tags, and Cookies for Comments Plugins | WPCandy
    Posted at 21:00h, 02 November Reply

    […] Multisite Plugin Sitewide Tags is almost ready for a new update, with added thumbnail support from Rennick, but Caoimh asks those who are able to test the development […]

  • Bill
    Posted at 09:31h, 13 November Reply


    Adding this code works: the_post_thumbnail();

    But it does not seem to be possible to display the post thumbnail at any other size.

    ie: the_post_thumbnail(‘large’);

    Just unexpected. I’m not sure there is a way around this without adding an option to the admin page that lets the admin select the size of the thumbnail that is desired.

    (sorry for the multiple posts…. fixing php error above)

    • Ron
      Posted at 13:27h, 13 November Reply

      It uses the ‘thumbnail’ size. You can change your thumbnail size on the source blog(s) in the media settings.

  • Rae
    Posted at 13:12h, 13 November Reply

    Ok, I have the latest version of the plugin and all seems to work well except the post thumbnails. Is this supposed to pull the thumbnails from the wp-gallery used or do we need to use custom fields for them to show? Also, it may be obvious to some, but I do not know where to put that template tag mentioned in your post.

    • Ron
      Posted at 13:29h, 13 November Reply

      It does not copy the attached images over to the tags blog. It copies the thumbnail image tag (html) to the tags blog. So, it only supports the built in thumbnail functionality.

      For editing the theme, contact your theme support.

  • Jim W
    Posted at 12:06h, 28 March Reply

    A newbie to WP here – I love the plugin for our network of sites. We’re attempting to convert our sites using genesis/lifestyles.

    I can’t seem to figure out where this code the_post_thumbnail(); goes.

    Can anyone give me a clue to which template I should be looking at?


Post A Comment