$10
WordPress: Custom rewrite rules
Hi,
I'm trying to create custom rewrite rules for some Custom Post Types that I'm using on a site. The site is multilingual so each CPT require a language setting in order to be displayed correctly when browsing the site (I chose not to create two individual posts in order to save time for the client when publishing - the posts have lots of options).
The goal is to make the following rewrites:
fastigheter-spanien/X -> property/X&lang=sv
fastigheter-usa/X -> property/X&lang=sv
properties-spain/X -> property/X&lang=en
properties-usa/X -> property/X&lang=en
Where X is the slug for the CPT. Basically I just want to add a language setting and hide the ugly "property" in the url, either by modifying .htaccess or adding rewrite rules in functions.php. I've tried both on my own but just can't manage to solve it.
Thanks in advance.
WordPress version 3.0
I'm trying to create custom rewrite rules for some Custom Post Types that I'm using on a site. The site is multilingual so each CPT require a language setting in order to be displayed correctly when browsing the site (I chose not to create two individual posts in order to save time for the client when publishing - the posts have lots of options).
The goal is to make the following rewrites:
fastigheter-spanien/X -> property/X&lang=sv
fastigheter-usa/X -> property/X&lang=sv
properties-spain/X -> property/X&lang=en
properties-usa/X -> property/X&lang=en
Where X is the slug for the CPT. Basically I just want to add a language setting and hide the ugly "property" in the url, either by modifying .htaccess or adding rewrite rules in functions.php. I've tried both on my own but just can't manage to solve it.
Thanks in advance.
WordPress version 3.0
Staffan Estberg | 07/31/10 at 12:19pm |
Answers | Tags
(4) Possible Answers Submitted...
You must be logged in to view answers or answer this question.



