WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For some reason the PrettyPhoto script that WooCommerce is now using is adding #prettyPhoto to the end of URL's once it's been opened in that page.

See here for an example

Also, when you close the lightbox down it takes 2 or 3 clicks of the back button to get back to where you were previously.

Anyone have any idea why?

share|improve this question
up vote 0 down vote accepted

That is a … feature of this script, called deeplinking. It should be fixed already, maybe you missed an update?

As you can see in that commit, you can disable it by editing assets/js/prettyPhoto/jquery.prettyPhoto.init.js. Add

deeplinking: false

… to all calls of prettyPhoto({});.

share|improve this answer
You're right, I didn't realise there was an update available! – Dean Elliott Apr 30 '13 at 22:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.