How Can I Create a Friendly Slug for a Dynamic Page?

I built a dynamic page template that pulls biography information from a MySQL table.

The page works fine but the URL is ugly.


I have a set of canonical slugs that I want to use for each officer.

for example, Officer-Firstname-Lastname

I’ve tried both htacess and add_rewrite_rule and both give me 404.

example: add_rewrite_rule('Officer-Erich-Abberger', 'Officer-Biography/?ID=1', 'top');

What am I missing?

Go to Source
Author: jpollar