Pass URL POST Fix
-
Hi
How can we add fix post fix on every page/post.
For example
www.example.com/page-slug/FIXED-SLUG
or
www.example.com/parent-slug/subpage-slug/FIXED-SLUG
I have added below
add_rewrite_rule('^([^/]*)/FIXED-SLUG/?' , 'index.php?pagename=$matches[1]&fixed_slug=1','top' );
This is working for root page but this is not working for Sub level page.
For this i have already tried
add_rewrite_rule('^([^/]*)/([^/]*)/FIXED-SLUG/?' , 'index.php?pagename=$matches[2]&fixed_slug=1','top' );
&
add_rewrite_rule('^parent-page/([^/]*)/FIXED-SLUG/?' , 'index.php?pagename=$matches[1]&fixed_slug=1','top' );
But this is not working
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Pass URL POST Fix’ is closed to new replies.