Reputation: 175
I just don´t know what I am doing wrong.
I have the latest xampp, also wordpress 4.5.2, and I make an XML file, with all the posts that I need to import, but when I import it the permalink is cutoff the middle part.
In the XML file there is the tag link, which define the permalink from each post, and is structure like the exemple bellow
http://localhost/site/man-clothes/jeans-pants/ripped/rock-style
http://localhost/site/man-clothes/jeans-shorts/washedout/rock-style
But when I import the XML file, the permalink gets cutoff like so:
http://localhost/site/man-clothesrock-style
http://localhost/site/man-clothesrock-style
Does anyone knows why wordpress cutoff the middle part? I think it was the .htacess file, but I remove and still does this change in the permalink.
Upvotes: 2
Views: 227
Reputation: 175
I figure out was I was doing wrong.
There´s a tag named "post_name" in the xml. And there´s a tag named "link"
So I have to set this two fields, with the adress that I need.
So in the "link" fild is setup this way:
<link>http://localhost/site/man-clothes/jeans-pants/ripped/rock-style</link>
And the "post_name" fild I setup like this:
<post_name>man-clothes/jeans-pants/ripped/rock-style</post_name>
Now the permalink show like this
http://localhost/site/man-clothesjeans-pantsrippedrock-style
He takes the whole string, but, trim off the "/" from it.
If some one knows why this happens, I'll appreciate the help.
Upvotes: 0