You can try URL rewriting like that
add_action("wp_loaded", function () {
add_rewrite_tag("%id%", "([^&]+)");
add_rewrite_rule(
'^details/[^&]+/([0-9]+)/?',
'index.php?id=$matches[1]&pagename=details',
'top'
);
});
And then flush rewrite rules cache one time in Settings -> Permalinks.
With this rewriting, the identifier is no more in $_GET but you can get it with https://codex.wordpress.org/Function_Reference/get_query_var.
Related Posts:
- Custom pages with plugin
- Add rewrite rule to permalink structure
- Add Rewrite Rule for custom page
- add_rewrite_rule, plugin activation and plugin deactivation
- flush_rewrite_rules not working on plugin deactivation, invalid URLs not showing 404
- Custom rewrite rule is not picked by 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
- How can I rewrite a plugin generated URL?
- flush_rewrite_rules() not working on plugin activation
- WordPress custom URL Rewrites redirecting not masking
- How does WP handle multiple matching rewrite rules?
- Custom rewrite rules not working with WPML
- How to Create a Custom Slug for Tags and Categories with a prefix or suffix?
- Custom url rewriting
- WordPress rewrite rules not working
- Do rewrites added with add_rewrite_rule() persist after plugin deletion?
- i want to rewrite my custom plugin url
- add_rewrite_rule to load different page, without changing URL in browser
- WordPress rewrite rule depend on meta values not ids
- Change custom rewrite rule when permalink is updated/changed
- Custom pages with plugin
- Apache rewrite rules and wordpress problem
- WP Job Manger change jobs url (NOT slug)
- Problem with Author page redirect
- URL rewrite of independent plugin?
- Plugin generated taxonomies’ permalinks with custom placeholders
- Redirect to another page using contact form 7? [closed]
- Remove .htaccess portion upon plugin deactivation?
- Prevent plugin from intruding on wp-json posts api
- Locked out of admin panel after installing HC Custom WP-Admin URL [closed]
- Edit Permalink Structure For Custom Post Type or Modify .htaccess?
- Create WordPress posts from JSON array using plugin in admin
- How to customize a title by passing query string?
- Adding inside wp-plugin jQuery script that receives JSON-formatted data, generated by php-function inside this plugin
- WordPress plugin url for form submit
- Creating author Specific page URL
- rewrite_rules() not applying rules on plugin activation only after permalinks menu is clicked
- Username Variable in custom links?
- WP Rest API and json_decode()
- How to rewrite URL and get the values?
- Call Ajax URL in Plugin
- Passing value as hidden parameter to next page
- How to force load a page in plugin?
- How to embed a new string in url?
- rewrite file to wordpress
- TranslatePress | secondary language category/sub-category not working correctly “`/%category%/%postname%/“`
- Dynamic URL Rewrite for Custom
- can’t install any wp plugins [duplicate]
- Change language on website and change currency with url query
- Upload Javascript and json webpage to wordpress
- I’m receiving the following error using the below code: Uncaught Error: Cannot use object of type WP_REST_Response as array
- How to add a PW Gift Card to a Woocommerce Order request API?
- Hidden permalink different from displayed permalink
- Having a problem with rewrite_rules and rewrite_tags – url not rewriting properly and query var missing
- In a plugin, How to update a json file using ajax
- Rewrite/Change custom taxonomy slug
- Custom Rewrite Rule Removing Query String
- one url for all pages
- Add custom WordPress admin page with pretty url via code
- How to use Datatable with Ajax when creating plugin on WordPress?
- WordPress output data to another website and pull data
- CRUD from WordPress to Business Central 365 through OData REST API
- How To Use htaccess to Rewrite Link Structure for a Page that is Generated Programatcially
- plugin: rewrite rules are lost when WP updates
- How to give .html extension to just one post not all post
- URL Rewrite 404
- WordPress drop domain alias
- catch urls with specific pattern and show specific content for them by plugin
- Plugin json page
- WordPress PHP error getting posts from another wordpress blog
- I am trying to rewrite urls in WordPress, but its not working
- API page return Header 500 but Work
- WP Rest API v2.0 user profile update issue
- Populate select option with JSON file
- Get custom term link archive with prefix
- How to regenerate slugs for categories and tag converting non-Latin characters?
- Change default url to plugin custom post type
- Rewrite in plugin
- add_external_rule – rules deleted when visiting permalinks page
- How to disable wordpress page rewrite rule?
- Ajax specific template not loading in replacement of index.php
- Disable default posts (Posts,Pages,Comments and Media) in wp-admin
- Creating custom URL for async content
- URL RewriteRule doesn’t work when using WP Database Participants in my WordPress website
- Custom shortcode with dynamic rewrite
- Rewrite URL to plugin file
- JSON Feed on my wordpress Blog
- How to programatically create a simple HTML page using the permalink of a WordPress post?
- How To Rewrite WordPress Pages URL Only?
- custom url with custom post
- How to remove post redirects
- How to get the parameters on page and avoid 404?
- URL Rewriting from a Plugin based on custom values
- How to create custom content on custom page from plugin?
- How can I process all requests for a given directory in a URL with my plugin?
- Rewrite rule help for gallery plugin
- Plugin with custom domain
- Plugin Admin Page Ajax-Admin call returning 0, URL set correctly. Implemented localized scripts but did not fix it
- wordpress plugin JSON API search within specific category