Broken internal links to parent page from child pages
-
When I set some pages as “Parent” (implicitly making others “Child” pages), WP seems to blow away internal links.
To demonstrate I have created two pages, “Page 1” (page-1) and “Page 2” (page-2).
1) page-1 has Parent set to “Main (no parent)”.
2) page-2 has Parent set to page-1. page-2 content body contains a link to page-1 (edited using the HTML editor). That link looks like this:
<a href="page-1">Go to Page 1</a>
Problem:
When I hover over that link (“Go to Page 1”) in Page 2, the address it shows in the browser status bar is bizarre (and is displayed with strikethrough – seemingly – and accurately – indicating that it is a broken link):
https://example.com/wpsandbox/page-1/page-2/page-1
I get a “404/Page Not Found” error when I click the link.
When I remove the parent/child relationship (both page 1 and page 2 have no parents), the link works.
The site I am working on is a migration from a proprietary platform. I have some 200 html files whose body content I pasted into WP pages using the code editor. These files have extensive internal linking. WP seems to put this code into “Custom HTML” block. The nature of my challenge makes it such that manually editing each and every link impractical.
Is the parent/child functionality in WP just a thing to avoid in my context? Or maybe there’s some way to get WP to use my links “as is”?
Thanks for any suggestions!
- The topic ‘Broken internal links to parent page from child pages’ is closed to new replies.