Reputation: 436
I am new to wordpress so trying to figure out something which I cannot and asking you guys. Please help if you know.
I have issues with URL formation in Wordpress. I want to show articles' category name in URL, so I am using Permlinks -> custom structure
which is like /%category%/%postname%.htm
I then pasted code given by WP in .htaccess
file. So now articles use http://mysite/category1/article1.htm
URL.
But then on index.php any links inside article shows URL ashttp://mysite/article2.htm
and hence 404. I am using ><a href="article2.htm">Article2</a>
inside a post. If I open http://mysite/category1/article1.htm
then above link will show as http://mysite/category2/article2.htm
which is the correct URL.
Can someone plese help me figure out correct way? Using above configuration, it works fine for all links when open individual posts but only main index.php does not include category name. Just to note, URLs in Recent Posts also show correct URL.
Upvotes: 0
Views: 338
Reputation: 13344
If the links are hardcoded inside the article itself, there's nothing inside WordPress PHP or settings to change. You just need to edit the post content and update the HTML link URLs using the new permalink structure, within Posts and/or Pages tab.
You can also try a plugin like Redirection
which will redirect old post permalinks to the new (correct) permalink format.
http://wordpress.org/plugins/redirection/
Upvotes: 2