• Resolved terry5578

    (@terry5578)


    I have a static site that has a set of links to various pages in the header and basically a copy of those same links in the footer (the code is the same). The header links work fine but the links in the footer do not. I am sure they were working correctly but now are not and I am not sure where to look to figure out why.

    When you mouse over the links in the header you see where the link is pointing to the page number of the link. But in the footer the link is pointing to the page name not the number. What is really confusing to me is that all these page name links send you back to the home page. I would expect a 404 error for page not found not redirected to the home page. And again the code for the links in both the header and footer is the same.

    the site is https://waltdisneyworld.eguidesintl.com/ if looking at it helps. I have actually been trying to get the pretty permalinks working again for some time without success. Not this is a set even further backwards.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Your top links are working because they don’t depend upon pretty permalinks. Your footer links do. Perhaps they’ve been hard coded into the footer?

    Thread Starter terry5578

    (@terry5578)

    No they were not hard coded. I checked the code and the link code in the footer is identical to the link code in the header.

    So are you saying that the footer does not use the permalinks?

    I did not create this site. It was not functional when I got it so I am not really sure what worked and what didn’t. At one time I believe the pretty permalinks worked on this site. But I have been unable to get them working again. But I am sure these footer links were working the other day. I am just not sure what I might have changed to mess them up. Currently my permalinks are set to the default using the page #.

    Are you saying I need to hard code the page #’s into the links?

    The header links do not use pretty permalinks. The footer links do. How is the menu generated in footer.php?

    Thread Starter terry5578

    (@terry5578)

    OK – here is the first section of links from the footer.php

    <li><a href="https://waltdisneyworld.eguidesintl.com/about/">Information</a></li>
    <li><a href="https://waltdisneyworld.eguidesintl.com/attractions/">Attractions</a></li>
    <li><a href="https://waltdisneyworld.eguidesintl.com/dining/">Dining</a></li>
    <li><a href="https://waltdisneyworld.eguidesintl.com/events/">Events</a></li>
    <li><a href="https://waltdisneyworld.eguidesintl.com/shopping/">Shopping</a></li>

    It is the same as the header.php.

    So if the header does not use permalinks – why is it substituting the page number in place to the page name. More importantly – if the footer does – why isn’t.

    Thread Starter terry5578

    (@terry5578)

    Interesting – in the log my last update is showing esmi posted it. Hope this shows me as poster so esmi knows I answered him.

    Nope – either I have a problem or this forum is messed up right now. It shows the correct number of posts – but it shows esmi made the last post and that it was 1 hour ago.

    Maybe it was a glitch at your ISP’s end?

    The code for the links that you posted above is what I would define as hard coded. You’d be better off replacing them with wp_list_pages and either the include or exclude parameter (whichever is easiest). That way your links will always work.

    Thread Starter terry5578

    (@terry5578)

    What I find confusing is the fact that both the links in the header and the footer are coded the same. The footer links are not working and you say are controlled by permalinks. But the links in the header do work and are replacing the hard coded page name with the page number and are not controlled by permalinks. So how are the header links working? Where are they getting the page numbers if not through permalinks?

    The header links do not use pretty permalinks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Header links work – same links in footer do not’ is closed to new replies.