WordPress OrangeBox Plugin doesn’t work in Sidebar

OrangeBox is a plugin for WordPress which creates a fancybox or thickbox effect for all media on your blog. Such as pictures, videos, etc.

Its really nice and effective fancybox plugin which you can use with your WordPress blog.

Now about the problem, The plugin only works in Single post or Single page area of WordPress posts.

I wasn’t aware of this till the time i tried to use OrangeBox in the sidebar !

When i tried to use OrangeBox in the sidebar, it just used to open up a completely new web page instead of opening the content in a fancybox.

I have drawn a image which explains this problem very well –


See the image above, Consider you want to open the blue image in the sidebar of your blog.

Case 1 – When you click on the image in the sidebar, it simply opens up in a new window.

Case 2 – When you click on the image in the sidebar, it opens up in a fancybox effect with the help of OrangeBox.

Case 1 is our problem and Case 2 is how we want it to work.

How to Solve it?

If you are displaying an image link in the sidebar then you might be using this type of code:

And that code might not work well with OrangeBox.

So to get it to work, you can just replace that code with the following code:

And that would definitely solve the problem.

If you have any questions or if this doesn’t work out with your blog, then comment below. I’ll try and help asap. Thanks for reading.