Skip to main content
added 1 character in body
Source Link
David
  • 123
  • 1
  • 6

i usually add rewrite rules for custom pages like this:

add_rewrite_rule('^deal-purchase?','index.php?is_purchase_page=1&post_type=page','top');

However on a site im working on now, the above just redirects to the home page whereas if i create a custom post type and reference that:

add_rewrite_rule('^deal-purchase?','index.phpis_purchase_page=1&post_type=market'php?is_purchase_page=1&post_type=market','top');

it works. Anyone any ideas what might be causing the 1st code to fail?

i usually add rewrite rules for custom pages like this:

add_rewrite_rule('^deal-purchase?','index.php?is_purchase_page=1&post_type=page','top');

However on a site im working on now, the above just redirects to the home page whereas if i create a custom post type and reference that:

add_rewrite_rule('^deal-purchase?','index.phpis_purchase_page=1&post_type=market','top');

it works. Anyone any ideas what might be causing the 1st code to fail?

i usually add rewrite rules for custom pages like this:

add_rewrite_rule('^deal-purchase?','index.php?is_purchase_page=1&post_type=page','top');

However on a site im working on now, the above just redirects to the home page whereas if i create a custom post type and reference that:

add_rewrite_rule('^deal-purchase?','index.php?is_purchase_page=1&post_type=market','top');

it works. Anyone any ideas what might be causing the 1st code to fail?

Source Link
David
  • 123
  • 1
  • 6

add_rewrite_rule issues

i usually add rewrite rules for custom pages like this:

add_rewrite_rule('^deal-purchase?','index.php?is_purchase_page=1&post_type=page','top');

However on a site im working on now, the above just redirects to the home page whereas if i create a custom post type and reference that:

add_rewrite_rule('^deal-purchase?','index.phpis_purchase_page=1&post_type=market','top');

it works. Anyone any ideas what might be causing the 1st code to fail?