php coding - fix the previous page link

The current "back to" link goes to the parent category & not the previous page.
On this page:
http://66.147.244.225/~minimosa/category/tile-gallery/new-tiles/

Click on the Collage tile (3rd in 1st row) & see how the  "back to" link that takes you to the parent category & not the previous page.

Several of these posts belong to more than one category.  I want the "back to link" on this page to go to the previous page,  not the parent category that is sometimes one of 2 or 3 parent categories & not the previous page.

Can you show me how to edit the php file to fix this?

Thank you!

Attached is the current single_product.php file.

 singleProdNavi.php
carolsanjoseAsked:
Who is Participating?
 
PranjalShahCommented:
You can add this line in your code to go back one page..

<a href="javascript:history.go(-1)" title="Return to the previous page">&laquo; Go back</a>

The code in your file is correct to go to the parent category. I will keep both the links on the product page. So user can decide where to go.
0
 
Alicia St RoseOwner & Principle Developer/DesignerCommented:
Hi,
I'm not directly answering your question but just wanted to suggest that you move your bottom menu with "View Cart" to the top of the page. Right now it's below the fold and not very user friendly. You could move it to the very top right of your header...

The site looks great!

Okay, now I'll bud out because I don't have the answer to your question.

0
 
carolsanjoseAuthor Commented:
Thank you!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.