Sitewide Tags update

Yesterday, I released Sitewide Tags version 0.4.1. Donncha & I have been adding things to SWT over the last few months. I noticed after the this round of changes that we had forgotten to release an updated version after the last round of changes. So, there’s quite a bit added between 0.4 and 0.4.1:

  • Now has its own super admin screen (under network settings in WP 3.1)
  • Updated for WordPress 3.1
  • Support for post thumbnails – see Post thumbnails for Sitewide Tags
  • Support for custom taxonomies (including post formats)
  • utility to populate the tags blog from existing posts

Version 0.4 supported custom post types. The way to include custom post types is add a filter

add_filter( 'sitewide_tags_allowed_post_types', 
	'my_swt_post_type_filter' )

The filter passes an array formatted like array( 'post' => true ).

Custom taxonomies use a similar filter

add_filter( 'sitewide_tags_custom_taxonomies', 
	'my_swt_custom_tax_filter' )

The filter passes an array formatted like array( 'post_format', 'subject' ). The custom taxonomy code in SWT filters out the built in taxonomies even if they are added via the filter.

Download Sitewide tags from the repo.

Updated to add note about implementing one of these filters: Either of these filters can be implemented in the following ways:

  • a plugin install in the mu-plugins folder
  • a plugin installed in the plugins folder and network activated
  • a plugin installed in the plugins folder and activated on an individual child site where the custom post type or taxonomy is implemented
  • since custom post types & taxonomies may be theme depend you may want to add the filter to the functions.php file of the theme that implements the post type/taxonomy/post format

Comments

  1. Cool! Point of clarification: does the plugin support filtering by custom taxonomy term? As in, would I be able to set it so the plugin will only send posts to the “tags” blog that have a certain term set (like say “Featured”) in a custom taxonomy? Or would that require additional development?

    Thanks!

  2. Hello,

    Im running the sitewide tags plugin on my blog that has WordPress MS 3.0.5 . I am able to see all of the posts on the main blog, but the problem is the thumbnails are not showing up. I am using arras theme which uses featured images. Would this cause a ploblem? if so how can i get it to work?

    Thanks!

    • You’ll have to ask the author of arras about how the theme does thumbnails. In the Post thumbnails post I explained what WP function you use to pull the SWT thumbnail.

  3. Hey Ron,

    I don’t seem to be able to get the post formats to carry over to the global site. I was wondering if you could give me an idea of how that is accomplished?

    Thanks for your assistance.

  4. Makes perfect sense and somewhere I just brain locked. Added the filter as you explained and all works perfectly.

    Thanks for the quick response.

  5. Hii everyone,
    after to have downloaded the last version of “sitewide tags” i tried to put the code below

    add_filter( ‘sitewide_tags_allowed_post_types’,
    ‘my_swt_post_type_filter’ )

    and

    add_filter( ‘sitewide_tags_custom_taxonomies’,
    ‘my_swt_custom_tax_filter’ )

    in the “function.php” of my child theme but my site look as it crash …
    i tried also puting in the code in the “sitewide-tags.php” but do the same problerm!

    Did i wrong something?

    thanks

    • “my_swt_post_type_filter” is the name of a filter function that you create. See http://codex.wordpress.org/Plugin_API

      • lucaweb says:

        ooopsss .. i’m sorry but i’m realy not so good with programmation, so i taken a look at the wordpress codex but i can’t understand to much; i’d like just import in my main-blog all differents post-type and taxonomy from all sub-blogs; should i create a filter function with all name of post-types and taxonomies?

  6. Kobby Owusu says:

    I looked far and wide and came across examples of how to implement the filters.

    I tried this code: http://pastebin.com/E35YMNB1 but it causes my admin for that particular blog to go white screen.

    Since whitescreen usually means syntax error, i have tried other ways of the same simple code.

    I think my idea is wrong.

  7. Kobby Owusu says:

    Not quite done yet. Issue with permalink, custom fields not being carried over. Will update.

    Sleep….

    • If you are looking for plugin support, please use the wordpress.org support forum or hire a developer.

  8. Hi ,

    I installed sitewide tags plugin to my WPMU.But when I say http://localhost/wordpress-mu/tags/ , the tag cloud is not displayed.

    Any help would be highly appreciated.

    Thanks

  9. Hi Ron and Andrea,

    I’ve recently installed Sitewide Tags. It was able to import all the posts and linked to the thumbnails properly that had previously been created.

    The issue seems to be with newly created posts. If the post ONLY has a featured image and normal text in the post then the thumbnail image shows up on the main blog. But if I insert an image in the post the image on the main blog disappears and the img looks like this “”.

    What could make this happen? To further complicate issues, if I remove the image in the post. The thumbnail does not show back up. I have to delete the post and re-create it in order for the thumbnail to appear.

    Thanks for your constant work for the community,
    Keith

  10. Hello Ron,

    Can you post a sample code of the value of “my_swt_post_type_filter” ? I think this is the missing part..

    Thanks,
    Archer