Tag Archives: SEO

Create your own rewrite rules in WordPress

When you write your own WordPress plugin you might need to add new rewrite rules to WordPress. Some people add Rewrite rules direct into htaccess file, but when you open it you can see that WP don’t store rules into this file. All WordPress rewrite rules are stored into the database.

Default WordPress htaccess file

For manipulation with rewrite you can use WP_Rewrite class. It’s functions all listed at the WP Codes, but i will show you how to use most important ones.

rewrite_rules() function

This function “getRewriteRules”, will return array with listed rewrite rules. Array will be something like …

Continue reading

Popularity: 49% [?]