Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'd like to add an extra 'non-functional' url segment in front of the next url segments

e.g. I now have a url http://www.domain.com/news/newspost1/ but I'd like to add a cityname in front of the url so like this: http://www.domain.com/cityname/news/newspost1/

That way I can request which cityname it is on the page.

I've been fiddling with add_rewrite_rule() in wordpress but I can't seem to get it to work.

Any ideas?

share|improve this question
add comment

2 Answers

Look what i am saying you is not the good idea but i think, you can work with that for solving your issue. You can add page called cityname and make subpage news/newspost1/ within it :)

share|improve this answer
add comment

I'd use Custom Permalinks plugin

http://wordpress.org/plugins/custom-permalinks/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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