'WP All Import | replace all hyperlinks
I export many posts from my old web, and I want to replace href from every 'a' element that starts with my old page name like: "https://myOldPage/" to "https://myNewPage/" while importing posts.
Basically, I just want to change the name after "https://" because all posts have the same slug.
I want to make a function for that in the function editor that they have in the pro version of the plugin, but I kinda didn't understand how to use it.
So, I tried to find every href xPath that links to another post in the website and found that is probebly this xPath:
//*[@id="pix-entry-content"]/a[starts-with(@href,'https://myOldWebsite.com/')]
So how can the function editior help me? How can I change all href's that in the page that links to another post to link the same post but in the new website?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
