The approach is pretty much sound, this is how these things work in WordPress.
You might want to use add_rewrite_enpoint()
for implementation though, since it compresses multiple steps into on integrated call and fits many use cases well.
Related Posts:
- How to rewrite URL and get the values?
- Trying to Find the PHP File/Function that Handles a Specific Form Action URL
- Custom pages with plugin
- Add rewrite rule to permalink structure
- add_rewrite_rule, plugin activation and plugin deactivation
- Which method is best to enqueue scripts
- What is the best way to output plugin result in certain url
- Woocommerce different URL for every table placed in the restaurant
- Author Specific URL’s in WordPress
- Does flush_rewrite_rules() remove all rules added by other plugins as well as mine?
- Add_rewrite_rule doesn’t add custom url in plugin
- REST-API: extend media-endpoint
- flush_rewrite_rules() not working on plugin activation
- Create or Update thousands of woocommerce products via PHP
- custom taxonomy and custom post type url conflict
- Find the URL of the current plugin directory
- Rewrite url without flushing the database?
- How can I add an options page for my class based plugin?
- How to Create a Custom Plugin Permalink
- Sending WP posts to external API
- How to modify WCMP Rest API response?
- wp_remote_get() returns 403 while file_get_contents() does not
- Redirect to another page using contact form 7? [closed]
- Great blogs site resources/tutorial for WordPress Developers? [closed]
- Integrating boxtal PHP library into a custom WordPress Plugin
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- How to embed a new string in url?
- Change language on website and change currency with url query
- WordPress rewrite rule depend on meta values not ids
- is it possible to fetch data from a remote api while admin is writing a new post?
- One time call to external API in widget
- wp_remote_post To external API multiple values with the same key
- WordPress drop domain alias
- How to use information from the database in the front-end?
- what is the best way to create a premium plugin while also protecting your code
- Change default url to plugin custom post type
- Custom pages with plugin
- create web service for android app using wordpress website
- API Functions to Register and Show WordPress List Tables
- Creating custom URL for async content
- URL RewriteRule doesn’t work when using WP Database Participants in my WordPress website
- How To Rewrite WordPress Pages URL Only?
- Apache rewrite rules and wordpress problem
- How can I process all requests for a given directory in a URL with my plugin?
- How to get the real address from a url (permalink)
- Remove base from the custom post type URL [duplicate]
- WP Job Manger change jobs url (NOT slug)
- map urls to plugins
- HTML link within my plugin settings page
- How to create a custom wordpress plugin for a specific functionality?
- How can I send api calls from my plugin?
- Is it possible to create post in wordpress using postman?
- move setting data from wordpress api to codestar freamwork
- Error 400 Invalid “products[1].productId” Kinguin [closed]
- How to add img into a plugin?
- Calling a class method instantiated by ajax call in wordpress [closed]
- Custom CSS not being added by plugin
- Plugin generated unexpected output – No PHP errors
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- How to set the default value as the saved value once a form of widget is saved?
- Change url of posts with keywords
- Plugin generating unexpected output – on WP mysql dump import
- Remember the Meta Value With Radio Buttons
- How to access the WordPress DB from a plugin file
- How to use add_action for multiple instances of the same class
- jQuery code didn’t run on my plugin
- How do I show content from a plugin using the template the site is currently working with?
- How to check homepage contain blog post?
- Plugin option default value
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- Every time I de-activate a custom plugin, the site encounters a critical error
- Display my plugins content based on a pages post_id
- How to edit link for comment count
- Create “new pages” within the admin section of plugin
- A question of etiquette when forking a plugin? [closed]
- how to request a script more than once in wordpress
- Select Form Element Not Saving from Plugin Options
- why the wp_register_script doesn’t work for register_activation_hook
- The “Child Pages Shortcode” plugin, block template
- My widget won’t update its values when save is clicked
- How to log custom plugin error to debug.log file
- Quick press publish post hook
- Add a Custom Field in Comment Box next to the Text area
- How do you create a re-useable HTML fragment in wordpress
- using wp_footer hook in a plugin
- Next Previous Post in wordpress with previous / next link with title?
- How to use existing hook in twentytwelve to all theme of wordpress?
- WordPress Feed Creator Name Tag Full Name Instead Of First Name
- How to force load a page in plugin?
- count the number of views of a post excluding own views
- How to get a notification when the plugin is installed?
- Does WordPress check for updates of a plugin via plugins root folder name?
- WordPress plugin with its own “site”/theme
- Delete data from custom table when deleting a post
- Replace video url with video player
- How To Create A File Archive in WordPress?
- Different registration form for different roles
- Structuring function with registration_errors hook
- Disable plugin visibility at the plugin directory