Stop SOPA overlay

How to blackout your WP blog on January 18

Stop SOPA overlay
Pied Type as it appeared with the overlay

I started a bit of a discussion over on the WordPress forums about how to blackout my blog on January 18 in support of the Reddit blackout and other protests against SOPA and PIPA.

One of the suggestions will put a little diagonal banner in the upper right corner of your screen that links to more SOPA information. As you can see, I’ve added it. But I wanted a real in-your-face blackout for Janurary 18 and after some discussion, some trial and error, and Panos’s help (he, the Wizard of WordPress), I came up with a simple text widget that does exactly what I wanted — produces a semi-transparent black overlay for my entire blog. You can see how it looks on my test blog. Note it also links to more information on SOPA and PIPA.

If you’d like to do the same thing on your WordPress blog next Wednesday, click here for the code. Copy and paste it into an untitled text widget in your primary sidebar (themes vary, so if you have several different sidebars, you may have to experiment). Be sure to click “Save” before closing.

Your widget set-up should look something like this:

widget screenshot

This is HTML code; you don’t need a premium theme or WP’s CSS upgrade for it to work and it won’t break anything on your blog. If you don’t like it or it doesn’t work for you, just remove the widget.

My thanks to Panos and everyone else on the forum who helped me develop this easy way for WP bloggers to participate in the blackout and make a real statement.

Now if only Google and Facebook would join in …

(Not comfortable messing with your blog? Try everything on a test blog first. Just set up another blog, make it private, and play to your heart’s content. Populate with posts imported from your main blog. Try out this widget. Try out new themes. The sky’s the limit. I have several test blogs. Doesn’t everyone?)

Update: If you want to include PIPA on your overlay, go into the last line of the code and change “Stop SOPA” to “Stop SOPA & PIPA.” Be careful not to change anything else. Save.

Update: Easier yet, WordPress has finally installed an easy on/off setting for your blackout participation.

29 thoughts on “How to blackout your WP blog on January 18

        1. So you see my problem. I tried that code and every other variation I could find or think of and nothing worked. Frustrating, because I’m 90% sure I’ve used code, /code in the past and it worked just fine. So I finally just gave up and did the post like you see.

          1. Hmmmm. not sure why it wouldn’t work. I’m not surprised what I was trying to enter didn’t work. Perhaps upload a .doc file and provide a download link for it so that way no one will have to type all that in. I’m sure I’d mistype if I tried. I am the QUEEN of typo’s!!!!

          2. Thanks for the idea. I put in a link to a pdf file that can be easily viewed and copied. I wouldn’t wish that bit of typing on anyone.

    1. Thanks for the note. I had that problem on one of my test blogs and didn’t have the patience or know-how to add the z-index, although if it had been my main blog, I’d have probably spent a long time trying to get it to work. Did you finally get it to work? P2 may not be the only exception and other people may want to know how to do the code.

    1. By all means go to the WordPress forum I linked above and explain your problem. People there are extremely helpful and it’s likely someone will get right back to you with a suggestion or solution. I’ll take a look on my test blog and see if it works for me with your theme.

      1. I made a small comment over there, I’m hoping someone will respond I would love to do this without changing my theme. I love the forums, haven’t been over there in quite sometime. Thanks again Type for all your help with this!

      2. Rats. It doesn’t do diddly in your theme, does it? You might need the code with the z-index in it that Brainwreckedtech mentioned. Go to the forum and ask him specifically for his code, assuming he got it to work. The z-index makes sure the overlay appears in front of everything else. Could be with your theme, it’s currently coming up behind everything else.

        1. Ah ha! I went to the forum and used the code you placed there for me and it works nicely, beautifully! Yeah! Thanks. Now to remember what date of the week to use it on. 😉

          1. Great! I changed my post to link only to the “new, improved” code because it should work over a wider variety of themes than the first one I put up. Wish we had more time to get the word out before Blackout Day.

... and that's my two cents