简体   繁体   中英

Custom permalink in WP

How to archive the URL rewrite from example.com/?special=25 to example.com/special/25 .

Check out the WordPress WP Rewrite class . The examples towards the bottom look like they'd get what you are trying to achieve. Sadly not used this before so can't provide an example.

Without any more context to the question, it's a little difficult to say; however, based on the URL scheme that you've provided, 'special' appears to be a category, custom post type, or some other taxonomy .

If that's the case, then you can use a custom permalink setting set to: /%postname%/ and that would take care of it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM