WordPress.org

Forums

Using Sidebar and get_permalink to navigate on site (8 posts)

  1. JosephQ
    Member
    Posted 2 years ago #

    Hello and thank you for your help.

    This is the site: http://www.flegels.com

    The issue I have is that I need a link on the sidebar to go up one level of hierarchy. The inventory is split into brands then into collections then the individual products. I am new to wordpress and this site was created by a third party who is no longer available.

    This is the type of link that was on the side bar, and I looked at the codex on get_permalink but am not sure why I get these results.

    Here is an example, on this page, we are at a Baker collection called English Classes. The link at the bottom of the sidebar in red is the problem. Instead of it going to http://www.flegels.com/furnishings/baker-2/
    it goes to http://www.flegels.com/product/shield-back-side-chair-2/

    For now I can change it to go javascript:history.go(-1) in history but that is not going to work if someone is linked to the page.

    Please help if you can or explain to me what information I am missing to research this. Thank you.

  2. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    -- we are at a Baker collection called English Classes. The link at the bottom of the sidebar in red is the problem. Instead of it going to http://www.flegels.com/furnishings/baker-2/
    it goes to http://www.flegels.com/product/shield-back-side-chair-2/

    Check again. It does not work as you describe, but rather correctly.

  3. JosephQ
    Member
    Posted 2 years ago #

    Hello Krishna,

    I am sorry, I forgot to include the link of the collection. That is where the error is. The link at the Brands level is a hardcoded link.

    http://www.flegels.com/product-category/english-classics/
    At the lower left, it should link to http://www.flegels.com/furnishings/baker-2/ .
    However, it links to http://www.flegels.com/product/shield-back-side-chair-2/ .

    Does it have the same error for you as it does for me?

    Thank you,
    Krishna

  4. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    /product-category/english-classics/ links to
    http://www.flegels.com/product/regency-chair-2/ NOT product/shield-back-side-chair-2/.
    You may clear your browser caches and cookies and check the links. I don't find any problems. Even if you find the links incorrect, you just need to correct them which is not a big problem.

  5. JosephQ
    Member
    Posted 2 years ago #

    Thank you Krishna.

    I have cleared my caches/cookies and tried the links on different computers over the course of the week without any success. It links to different products depending on which one was the last loaded on the page which can be different when cache is deleted. However, the link is meant to not point to the last product but the Brand where the collection is a member of.

    Since the site uses the same sidebar for all the collections, the link is supposed to be created when the collection page is accessed. I do not know how to dynamically set up the link. Nor do I know what that functionality is called to research about it. Does this type of function sound familiar? Is there a workaround to this problem I have?

    Thank you for your time in reading this and your imputs.

  6. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    I rechecked.
    Return collections at http://www.flegels.com/product-category/english-classics/ is linked to http://www.flegels.com/product/shield-back-arm-chair-2/ and it is taking me there. I do not understand what else you need it to do.

  7. JosephQ
    Member
    Posted 2 years ago #

    Thank you for your quick replies.

    I need the link on english-classics to send me to http://www.flegels.com/furnishings/baker-2/.

    There are similar links, say http://www.flegels.com/product-category/consoles-buffets/ should link me to http://www.flegels.com/furnishings/woodbridge/.

    If you click on Furnishings on the header, it takes you to the total list of Brands. Each Brands has a number of collections. Click on any collection and you will be brought to that collection page that is not a static page. That page has a sidebar with the link that goes back the list of collections, but each of those links are incorrect right now.

    I'm sorry I do not know programming language to describe it clearly.

    Thank you for your time,
    Joseph

  8. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Anyway, how did you link the posts/pages on the sidebar? Using text widgets? If so, can you check every link and change the incorrect ones to correct the correct links?

Topic Closed

This topic has been closed to new replies.

About this Topic