Tweeted twitter.com/StackWordPress/status/766679088723550208
2 added 53 characters in body
source | link

I'm having trouble trying to learn how to write this url into a regex template to add in as a rewrite. I've tried various regex sandboxes to figure it out on my own but they won't allow a '/' for instance when I copy an expression from here for testing: enter image description here

I've got a custom post type (publications) with 2 taxonomies (magazine, issue) which i'm trying to create a good looking url for.

So after many hours i've come here to find out how I can convert this

index.php?post_type=publications&magazine=test-mag&issue=2016-aug

to a templated regex expression (publication, magazine and issue are constant) that can output

http://example.com/test-mag/2016-aug/

and hopefully with room to extend if an article is followed through from that page.

Thanks in advance.

I'm having trouble trying to learn how to write this url into a regex template to add in as a rewrite. I've tried various regex sandboxes to figure it out on my own but they won't allow a '/' for instance when I copy an expression from here for testing: enter image description here

I've got a custom post type (publications) with 2 taxonomies (magazine, issue) which i'm trying to create a good looking url for.

So after many hours i've come here to find out how I can convert this

index.php?post_type=publications&magazine=test-mag&issue=2016-aug

to a templated regex expression that can output

http://example.com/test-mag/2016-aug/

and hopefully with room to extend if an article is followed through from that page.

Thanks in advance.

I'm having trouble trying to learn how to write this url into a regex template to add in as a rewrite. I've tried various regex sandboxes to figure it out on my own but they won't allow a '/' for instance when I copy an expression from here for testing: enter image description here

I've got a custom post type (publications) with 2 taxonomies (magazine, issue) which i'm trying to create a good looking url for.

So after many hours i've come here to find out how I can convert this

index.php?post_type=publications&magazine=test-mag&issue=2016-aug

to a templated regex expression (publication, magazine and issue are constant) that can output

http://example.com/test-mag/2016-aug/

and hopefully with room to extend if an article is followed through from that page.

Thanks in advance.

1
source | link

Wordpress URL rewrite regex

I'm having trouble trying to learn how to write this url into a regex template to add in as a rewrite. I've tried various regex sandboxes to figure it out on my own but they won't allow a '/' for instance when I copy an expression from here for testing: enter image description here

I've got a custom post type (publications) with 2 taxonomies (magazine, issue) which i'm trying to create a good looking url for.

So after many hours i've come here to find out how I can convert this

index.php?post_type=publications&magazine=test-mag&issue=2016-aug

to a templated regex expression that can output

http://example.com/test-mag/2016-aug/

and hopefully with room to extend if an article is followed through from that page.

Thanks in advance.