rewrite_rule() not preserving the query string

If faculty is a child page of meetings, the rule should be:

add_rewrite_rule(
    'meetings/faculty/([^/]+)/?$',
    'index.php?pagename=meetings/faculty&hash=$matches[1]',
    'top'
);

pagename=meetings/faculty instead of p=1598

EDIT- or alternately:

add_rewrite_rule(
    'meetings/faculty/([^/]+)/?$',
    'index.php?page_id=1598&hash=$matches[1]',
    'top'
);

page_id=1598 instead of p=1598

Leave a Comment