admin管理员组

文章数量:1327481

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

The page works fine but the URL is ugly.

Officer-Biography/?ID=1

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?

本文标签: functionsHow Can I Create a Friendly Slug for a Dynamic Page