企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` add_action('init', 'my_rr_url'); function my_rr_url() { //Ensure the $wp_rewrite global is loaded global $wp_rewrite; add_rewrite_tag('%myname%', '([^&]+)'); add_rewrite_rule('haha/([A-Za-z0-9]{1,})/?$', 'index.php?page_id=8&myname=$matches[1]', 'top'); //Call flush_rules() as a method of the $wp_rewrite object $wp_rewrite->flush_rules(); } ```