最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

import - Importing XML to Wordpress, permalink problem

programmeradmin2浏览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.

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.

Share Improve this question edited May 8, 2016 at 3:27 Alê Moraes asked May 7, 2016 at 18:09 Alê MoraesAlê Moraes 1513 bronze badges 3
  • May be you need to check the permalinks settings on the backend. – Prasad Nevase Commented May 8, 2016 at 3:59
  • It is /%postname%/ – Alê Moraes Commented May 8, 2016 at 4:01
  • I think it should be /%category%/%tag%/%postname%/. Please try it. – Prasad Nevase Commented May 8, 2016 at 4:11
Add a comment  | 

1 Answer 1

Reset to default 1

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.

发布评论

评论列表(0)

  1. 暂无评论