Regulatory Notices Plugin

for WordPress

We had a professional services client who asked us to make sure that any blog that was written by his members of staff always had a compliance statement on the bottom of the page. He then wanted to be able to post a notice at the top of his site so there was no question that everyone saw it. Subsequently he changed the theme for his site and wanted the code to go at the bottom. In the end we wrote a plugin, now where ever he wants to put it he can. This is the plugin.

Allows administrators to add notices to the top and bottom of a site and/or add a notice to posts for the purpose of compliance, statutory requirement or disclaimers.

RN_site_top1

It provides a secure way for an administrator to ensure that they have control of regulatory notices that may be required by the site whilst giving creative access to other users. It is often the case that those who are creative are the least likely to ensure that the legal niceties are conformed to. This plugin allows for:

Features

  • Administrator access only
  • Add notice above the site
  • Add notice below the site
  • Add notice to each post
  • Add a notice to any combination of the above

From Version 1.11 the administrator can exclude certain post categories from displaying the global options notice. This may be useful if you are publishing some posts to subscribers, say staff, and others externally where you may wish to have a notice. the companies staff news or financial advice to the public.

You can add tags into your notices and can then use your own style sheet classes or use inline styles to set the layout of your notices.

Bonus: Should you want to add script to the bottom of your pages, such as Google Analytics then you are able to add that in the Footer section and it will be added to each page

Limitations: We are aware that themes are getting ever more complicated and the plugin works by inserting the content before wp_head and after wp_footer which for some sites may not be the best place for a disclaimer or may be used be other layout features of a theme. By providing three separate locations for the next we believe that it will work in some combination for all sites. If you require any custom help in adding notices to your theme then please mail wordpress@fernleafconsulting.co.uk

Administration

The plugin is simple to use and with a little html knowledge you can customise the output as much as you like.

RN_site_TopAdmin

By going to your administration page on your WordPress web site, logged in with administrator rights, go to Settings from the sub-menu click Notices and you are there. You will see 3 boxes to input your Notice. Site Header, Site Footer and Optional Text.

If you click the image it will give you a complete picture of the plugin screen.

Site Header

Any text or code that is placed in this box will be placed before the wp_head() in your site. For those of you who are not familiar with these WordPress code then it is a hook that is general placed at the top of a theme. This hook is theme-dependent which means that it is up to the author of each WordPress theme to include it. It may not be available on all themes, so you should take this into account when using this plugin.

Site Footer

Any text or code that is placed in this box will be placed after the wp_footer() in your site. For those of you who are not familiar with these WordPress code then it is a hook that is general placed at the bottom of a theme. This hook is theme-dependent which means that it is up to the author of each WordPress theme to include it. It may not be available on all themes, so you should take this into account when using this plugin.

Optional Text

Any text or code that is placed in this box will be placed after the content of a post. This means that in any blog or post the notice will appear at the bottom of the post but before the comment. This should be used when the administrator wants to make sure that any content that is produced by logged in users still carries the notice that he requires.

Styles

You can continue to use your own style sheets in the notices that you create by using an HTML tag like span and adding a class or id as you require. You can also us inline styles such as:

<span style=”display: block; text-align: center; color: red; font-size: 8pt”>ABC Example LLP. Authorised and regulated by the Solicitors Regulation Authority. Authorised and Regulated by the Financial Conduct Authority</span>

We’d always use SPANs so they don’t invalidate your HTML when being nested (a DIV inside a SPAN would be a violation). We’d never define [center] as <div align=”center”>{TEXT}</div>, We’d always use <span style=”display: block; text-align: center;”>{TEXT}</span>, which has way less chance of invalidating your HTML.

What most people don’t know:
A <div> is nothing else than a <span style=”display: block;”>.
A <span> is nothing else than a <div style=”display: inline;”>.
A <div> is not allowed inside a <span>, but the other way around is fine.
Elements like b, i, u and such are like span and should not allow a div inside.

ABC Example LLP. Authorised and regulated by the Solicitors Regulation Authority. Authorised and Regulated by the Financial Conduct Authority

Copyright your posts

If all you want to do is add a copyright notice to the end of every blog post you right place the notice in the options box and it will appear on every post.

This is made easy by the plugin. Simply add the code to the appropriate box in the administration page and it will be added to your page.

Adding script to your page footer

Google Analytics
(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})

Installation

To add a WordPress Plugin using the built-in plugin installer:

  • Go to Plugins > Add New.
  • Under Search, type in the name of the WordPress Plugin or descriptive keyword, author, or tag in the search form or click a tag link below the search form.
  • Find the WordPress Plugin you wish to install.
  • Click Details for more information about the Plugin and instructions you may wish to print or save to help setup the Plugin.
  • Click Install Now to install the WordPress Plugin.
  • A popup window will ask you to confirm your wish to install the Plugin.
  • If this is the first time you’ve installed a WordPress Plugin, you may need to enter the FTP login credential information. If you’ve installed a Plugin before, it will still have the login information.
  • This information is available through your web server host.
  • Click Proceed to continue with the installation. The resulting installation screen will list the installation as successful or note any problems during the install.
  • If successful, click Activate Plugin to activate it, or Return to Plugin Installer for further actions.

To install a WordPress Plugin manually:

  • Download your WordPress Plugin to your desktop.
  • If downloaded as a zip archive, extract the Plugin folder to your desktop.
  • Read through the “readme” file thoroughly to ensure you follow the installation instructions.
  • With your FTP program, upload the Plugin folder to the wp-content/plugins folder in your WordPress directory online.
  • Go to Plugins screen and find the newly uploaded Plugin in the list.

For more information on managing plugins go to the WordPress site here.

How can I change the layout of my notice?

You can add html tags into your notices and can then use your own style sheet classes or use inline styles to set the layout of your notices. For example you can use a Span and the Style attributes to set things like the notice alignment and font. More details are in the Use and Installation tab on the right.

Why the choices of box?

The ability to place a notice above or below the site is for flexibility. You can of course use both but many people will just choose to use one and of course the one that works with there theme. We are aware that themes are getting ever more complicated and the plugin works by inserting the content before wp_head and after wp_footer which for some sites may not be the best place for a disclaimer or may be used be other layout features of a theme.

The third box allows you to add a notice to the bottom of a post and this is defined by is_single().
Will this break my Theme?

It shouldn’t but with the increasing complexity and variety of themes out there it is impossible to say that it won’t. However, the plugin does not do anything that will harm a theme and if it does interfere with it you can easily deactivate the plugin and delete the files from you plugin panel. Of course regardless of the plugin, child theme or new theme that you are using it is good practice to back up your site before you install anything new.

We have an error saying ‘Failed to open stream’?

Check with your host that SSI (Server Side Includes)are enabled on your hosting package

1.11 We have added tick boxes to allow the administrator to exclude certain post categories from displaying the global notice. This may be useful if you are publishing some posts to subscribers, say staff, and others externally where you may wish to have a notice. the companies staff news or financial advice to the public.
Author URI: http://www.fernleafconsulting.co.uk
Plugin URI: http://www.fernleafconsulting.co.uk/plugins
Requires at least: 3.0.1
Tested up to: 4.0
Stable tag: 1.11
License: GPLv3 or later
License URI: http://www.gnu.org/copyleft/gpl.html

ahodgesRegulatory Notices Plugin