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.

Comments

  1. Can we see a screenshot of the output?

  2. 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.

    • “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.

      • “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.

  3. Ron,

    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)

  4. 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.

    • 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.

  5. 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?

    Thanks

Trackbacks

  1. [...] 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 [...]

  2. [...] 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 [...]