AMP in custom post whit extra url parameters
-
i have this rewrite for my custom post “example”:
add_rewrite_tag( ‘%sub%’, ‘([^/]*)’ );
add_rewrite_rule(
‘^’.$example[‘post_type’].’/([^/]*)/([^/]*)/?$’,
‘index.php?’.$example[‘post_type’].’=$matches[1]&sub=$matches[2]’,
‘top’
);
A exemple of this rewrite:
site.com/exemple/post-slug/download/
site.com/exemple/post-slug/old-version-2/If i use site.com/exemple/post-slug/amp/ this dont work, and dont show amp page.
there is the possibility to call an amp page with the query var %sub% ?
or is there another way to make this work?
I hope you understand me, because I don’t speak English.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘AMP in custom post whit extra url parameters’ is closed to new replies.