Back one directory in php

I am building a wordpress site with galleries in it and want to add a ‘Back to Gallery’ link in my single-attachment.php that will send the user back one directory.

For example, if the image is at I would want the link to send it back to

Any suggestions would be appreciated.

Read more here: Back one directory in php

Leave a Reply

Your email address will not be published. Required fields are marked *