Wordpress Safe Search Plugin

WP Safe Search acts as a simple filter on posts/pages lists by hiding the posts belonging to categories and tags ids you have marked as restricted. At any moment the reader may switch the filter off and on through a widget or a template tag link.

Description

Filtering content becomes a real problem when it comes to "offendant" material mixed with less specific one. Search engines may disallow ALL your content just because you do not have set any proper system to filter a few posts out of the rest. WP Safe Search provides a simple way for your wordpress website to follow such restrictive guidelines just by entering a few categories/tags ids on the plugin settings page and then filtering the corresponding posts. Your readers will anyhow be able to switch the filter off at any moment to access the censored posts/pages, thus letting them choose wether to read or ignore posts you have marked as restricted to a specific audience (provided you properly set up the WP Safe Search widget or template tag).

Installation

  1. Unzip and upload the wp-safesearch directory to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Go to WordPress admin area and list the categories and tags to hide on the Settings page.
  4. Place <?php if (function_exists('wpss_safesearch')) { echo wpss_safesearch(); } ?> in your templates or use the provided widget.

FAQ

What is WP Safe Search?

WP Safe Search provides your visitors a safer way to surf your site by hiding the categories and tags you may not find safe to let them browse without being conscious of the related 'risk'.

By activating this plugin, you now have the ability to hide "offendant" categories and tags

WP Safe Search does not modify your content, it only slightly changes the way it is rendered by filtering the posts listed.

How to filter risky categories and tags?

  1. Activate the plugin and go to the settings page
  2. Enter as many categories and tags ids as you want in the general options fields. Ensure to separate these ids by commas!
  3. Put the WP Safe Search widget in one of your site's sidebars.
  4. You may also use the following template tag in your theme's files:
    <?php if (function_exists('wpss_safesearch')) { echo wpss_safesearch(); } ?>
  5. if you wan't to enclose the resulting html code between specific html tags, you can use the before/after parameters:
    <?php if (function_exists('wpss_safesearch')) { echo wpss_safesearch('li','li'); } ?>

How does it work?

In order to set the filter on, the visitor's browser MUST accept cookies.

The filter is active as soon you activate the plugin. It means that your visitors MUST deactivate the Safe Search filter first through the link provide by the widget (or the template tag) to access the hidden posts. It makes some sense as the filtered content being supposed to be offendant, it should not be shown prior to the visitor's consent.

The plugin does not alter your content in any way, it simply modifies the genuine WP Query by adding the 'category__not_in' and 'tag__not_in' statements corresponding to the categories and/or tags list entered through the admin page. So if you deactivate the plugin (or set non-existent categories/tags ids), your original content will be brought back.

If a post belongs at least to one of the filtered categories/tags, it won't be shown anywhere with the filter being activated.

NB: The filtering provided by WP Safe Search doesn't apply to any of the Wordpress' RSS feeds.

How to remove the WP Safe Search filter?

Just deactivate/uninstall the plugin to get your Wordpress website go and roll as it used to before!

If you need to disable the filter temporarily (for testing purposes by example), you can deactivate it OR set the filtered categories and tags to a non existent value (ie 0) through the plugin settings page...

What about caching systems ?

Be advised you should not activate WP Safe Search if there is any caching system plugin running. As the cache serves html files instead of running queries for any page requested, the first visitor entering an area with it's filter activated (or not) will therefore populate the cache with html files reflecting it's own view of this particular area of your Wordpress site...

How to inform the visitor the content has been filtered?

There is no simple way to notify visitors that some posts aren't shown in combined archives (like date archives, searches,...), as safe posts will still be shown while unsafe ones will be effectively filtered. However, for plain filtered categories and tags lists (the archives corresponding to the admin plugin set ids), you will better customize your 404 template to indicate that the archive or search content may be altered by the filter being active

What about support?

I can't spend as much times as I should in order to support plainly this plugin. So use them at your own risk and do not wait for quick answers to inquiries neither for updates on a regular basis.

Screenshots

Changelogs

0.2

  1. support for WPTouch
  2. better cookie management

0.1

  1. beta