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?
- 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
- Loading external page template and enqueue script from plugin causes 403 forbidden error
- WordPress plugin from own server
- Is their any way to Extend WPDB class and Overwrite the Default Query Function
- How do I only load a plugin js on it’s settings pages?
- Adding dynamic section to WordPress
- Use functionality of 2 wordpress plugins
- Autoload via composer in plugin interference
- Add Fields with Sub-Fields to WP Job Manager
- Can WordPress plugins “Talk to each other”?
- How to create custom embed block in gutenberg wordpress
- Plugin exceeds memory limit
- How can sanitize $_FILES[‘haq_slider’] field
- React JSX in WordPress Plugin Development
- My plugin wants to update another plugin
- Using SVN to upload plugin created with gutenberg blocks
- Force quit running background job
- Check if plugin exists/active “class_exists()” does not work on plugin territory
- breadcrumb need to show all pages and subpages
- Widget’s container?
- custom uploader in the admin area
- Error with get_price (and others) in self-written plugin to show price
- How to Include Fields in Query String When Making Request of WordPress.org Plugin API?
- WordPress Widget Not Saving Instance
- Issue with wp_handle_upload
- Different registration form for different roles
- My plugin does not install correctly if a previous version is still installed
- How to solve conflict with scripts?
- wp_insert_post not inserting post from XML
- Access “wp site health info” data from plugin
- WordPress Frontend Page using Plugin
- Change Woo Custom Endpoint Titles from a Plugin
- Having multiple URL structure for wordpress blog
- Missing files in enqueue actions causes WordPress to reload
- Adding/ Removing actions for plugins
- Get input form data posted by users
- How to regenerate slugs for categories and tag converting non-Latin characters?
- wp_verify_nonce fails always
- Custom Plugin: Point to `template_directory`
- Adding list of Indexes in wordpress document
- Disable default posts (Posts,Pages,Comments and Media) in wp-admin
- Plugin options not appearing on options page using tabbed navigation
- Storing values in Post Meta vs new tables
- Embed php code in custom field of a plugin [closed]
- add_meta_box showing blank screen in my page
- Plugin translations are not loaded from translate.wordpress.org
- Use inline callable for hooks and filters
- Error in using ‘admin_enqueue_scripts’ action through a class
- How do i fix this error?