Skip to content

Brug WordPress rewrite rules til custom theme page

function zebs_custom_rewrite() { // registers the mit_plugin and module query variable. WP will reject unkown variabels add_rewrite_tag(‚%mit_plugin%‛,'([^&]+)‛); add_rewrite_tag(‚%module%‛,'([^&]+)‛); // handles site.dk/mit-plugin and mudule such as site.dk/mit-plugin/mod    add_ rewrite_rule( ‚mit-plugin(/.*)?/?$‛, ‚index.php?mit_plugin=all&module=$matches[1]‛, ‚top‛ ); } // add function to init add_action(…

Back To Top