Rewrite CPT url parameter

by fesarlis   Last Updated May 15, 2019 17:08 PM - source

I am rather novice to rewriting so I would appreciate some help.

I've set up a custom post type (teacher) in WP. Later, it was decided that its slug must be changed to (instructor). The problem is that the old slug is hardcoded in many posts as a url parameter. For example:

http://example.com/?teacher=teacher_name

I would like to set up a rewrite rule so that the above URL does not return a 404. It should be rewritten as:

http://example.com/?instructor=teacher_name

Is this possible? Any help would be great. Thank you very much.



Related Questions


DIVI Page Builder using Advanced Custom Fields PRO

Updated January 03, 2018 21:08 PM

Help with Multi Level Category Archive Page

Updated August 13, 2016 08:03 AM


Custom Post Archive is not working

Updated September 28, 2017 20:08 PM

Custom post type meta box field won't save

Updated September 06, 2017 18:08 PM