0

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?

2 Answers2

0

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 :)

IqbalBary
  • 1,086
  • 1
  • 11
  • 17
0

I'd use Custom Permalinks plugin

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

Joe Buckle
  • 871
  • 5
  • 14