hard flush_rewrite_rules() not regenerating .htaccess
Try using this for the the rewrite: global $wp_rewrite; $wp_rewrite->flush_rules( true ); see if that will work.
Try using this for the the rewrite: global $wp_rewrite; $wp_rewrite->flush_rules( true ); see if that will work.
add_rewrite_rule won’t work
Can rewrites fallback if 404? Rewrite conflict issue
Remove “/page/1” from the URL
How to change the URL pattern for single post view
get_query_var with add_rewrite_rule and add_filter(‘query_vars’) not working
What you’ve done is add a query variable, that’s great and necessary for what you’re trying to do, but there are 2 more steps to take: Making it pretty: Add a rewrite rule to map /books/edition/xxx to index.php?ed=xxx Making it functional: Make it load your custom template so it knows what to do when the … Read more
Plugin action rewrite rule – non_wp_rules
Flushing rewrite rule should not be done on routine basis, as stated per codex: Don’t do it on any hook that will triggered on a routine basis. You should either do it via the plugin activation hooks, or the theme switch hooks: add_action( ‘after_switch_theme’, ‘wpse315001_flush_rewrite_rules’ ); register_deactivation_hook( __FILE__, ‘wpse315001_flush_rewrite_rules’ ); register_activation_hook( __FILE__, ‘wpse315001_flush_rewrite_rules’ ); function … Read more
Basically, you are doing one thing wrong, which is actually having a file named manifest.json inside /wp-content/themes/your-theme. So, first, delete your file /wp-content/themes/your-theme/manifest.json. Then, in your functions.php file you can have your rewrite rule as: function fvpd_pwa_rewrite_rules() { add_rewrite_endpoint( “manifest”, EP_NONE ); add_rewrite_rule( substr( parse_url( get_template_directory_uri(), PHP_URL_PATH ), 1 ) . “/manifest.json/?$”, “index.php?manifest=true”, “top” ); … Read more