0

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.

  • May be you need to check the permalinks settings on the backend. – Prasad Nevase May 8 '16 at 3:59
  • It is /%postname%/ – Alê Moraes May 8 '16 at 4:01
  • I think it should be /%category%/%tag%/%postname%/. Please try it. – Prasad Nevase May 8 '16 at 4:11
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.