Questions tagged [rewrite-tag]

The tag has no usage guidance.

13 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
629 views

Regex in add_rewrite_tag not accepting OR operators?

I am trying to add a custom field to the post permalinks by using a combo of add_rewrite_tag and applying a post_link filter. What I am aiming for is something like this: http://example.com/%...
2
votes
0answers
187 views

What add_rewrite_tag()'s RegEx matches against?

I'm trying to figure out wether I can specify the position of the string to match (i.e. immediately after the domain) to reduce the chances of matching something else, but I don't even know what the ...
1
vote
0answers
32 views

Custom permalink leads to index page

I have a custom post type named patch and custom permalink structure: www.site.ru/patch/%version_id% I managed to replace %version_id with actual version code with this code: add_action('init', '...
1
vote
1answer
141 views

Enpoint Not Found in Rewrite Tag Permalink

I'm trying to make an XML feed show nice and pretty permalinks rather than showing query strings. The problem is I can't get my /products/ endpoint to show up when trying to process my custom rewrite ...
1
vote
0answers
69 views

404 error using Meta for Permalink rewrite

I'm trying to rewrite my permalinks using meta data from my post. The permalink rewrite works fine but I'm getting the 404 error when I try to view the post. Could someone offer a clue as to why this ...
0
votes
0answers
9 views

woocommerce product variation permalink

i have some Trouble with my try to develop a solution for my own Online Shop. i can not pay the Plugin what is doing what i need. i try to find a other solution. the beginning is that this code worked ...
0
votes
0answers
32 views

Rewriting a URL to use a custom querystring value

I've added a custom query variable and am attempting to rewrite URLs so that its value is part of the path as opposed to a query-string. For example, given the following URL: example.com/my_post_type/...
0
votes
0answers
103 views

add_rewrite_tag broke permalinks that doesn't use that specific tag

I have a custom post type that I'd like to have a permalink slug based on its taxonomy. All the posts of this CPT have one, and only one, term always marked on this specific taxonomy. That's my code: ...
0
votes
0answers
48 views

a way to support totally different url structure

I need to support permalink URL structure like: http://example.com/adult-course/newyork/language-course/english/standard http://example.com/adult-course/newyork/language-course/english/profi http://...
0
votes
0answers
67 views

Custom Rewrite Tag Structure

I am pondering over this intriguing question and I have yet to find an answer. I need to add my own Custom Structure Tags for my cpts. Extract fromt he link above: %year% The year of the post, ...
0
votes
0answers
90 views

URL Rewrite for CPT single posts

I'm struggling with Wordpress' rewrite function I have the following URL structure http://example.com/album/test-7/ 'album' is the slug for the CPT single page 'test-7' is the slug for the CPT post ...
0
votes
1answer
972 views

Passing variables in the permalink structure on a custom post type

I have a structure like this for my custom post types: domain.com/member/member-name/book/book-name Basically, I have a custom post type of member, and the member-name is the post. What I want to do ...
0
votes
1answer
93 views

Custom Taxonomy in Permalink from post type

I am using custom post types and custom taxonomies for that post type. This snippet currently sets the permalinks for the post type: 'rewrite' => array('slug' => 'myrewritebase'), I am ...