[wp-hackers] Custom URL Rewrite Help

Ryan McCue lists at rotorised.com
Tue Jul 2 12:45:28 UTC 2013


Dobri wrote:
> WP complies with the first rule matched. add_rewrite_rule adds your rule to the bottom of the list (I think).

Note the 'top' parameter there.

I believe the reason it's not matching is because the regex is wrong.

	([^/]+)/videos(/[0-9]+)?/?$

The first part of that matches anything but a slash, however the URL is:

	artist/artist-name/videos/3/

So, I don't believe that will match correctly. Try (.+) instead for the
first part.

-- 
Ryan McCue
<http://ryanmccue.info/>


More information about the wp-hackers mailing list