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)
- WP Rest API: details of latest post including featured media url in one request?
- How Do I add a redirect rule to WordPress?
- What is the best way to output plugin result in certain url
- WordPress wp-json API – Custom Post Type returns 403
- Add .html extension to custom post type taxonomies
- flush rewrite rules doesn’t flush them (still got 404)
- Author Specific URL’s in WordPress
- Nested CPT URLs + Posts 2 Posts
- Keep user’s privileges on accessing contents in JSON response
- custom taxonomy and custom post type url conflict
- Rewrite url without flushing the database?
- Where to access the available plugin/WordPress updates?
- Custom page slug without creating a WP page
- Best way to hook a custom url?
- Remove rewrite rules generated by plugin during deactivation
- How to Create a Custom Plugin Permalink
- Why slash is removed after domain?
- CMB2 Repeatable Group & JSON API
- WordPress JSON API remove posts from a specific category
- Plugin appends ugly URL string to index
- How to display the “ratingValue” and “ratingCount” values generated by the KK Star Ratings plugin into my page’s recipe ld+json schema
- wordpress json api not working
- How to use JSON data from URL into table on my wordpress website
- Is it possible to use multiple post_name, post_title and post_content?
- Rewrite rule not matching
- Problem with Author page redirect
- 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
- Username Variable in custom links?
- 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?
- TranslatePress | secondary language category/sub-category not working correctly “`/%category%/%postname%/“`
- Dynamic URL Rewrite for Custom
- Upload Javascript and json webpage to wordpress
- Hidden permalink different from displayed permalink
- Having a problem with rewrite_rules and rewrite_tags – url not rewriting properly and query var missing
- Rewrite/Change custom taxonomy slug
- Custom Rewrite Rule Removing Query String
- WordPress output data to another website and pull data
- How to give .html extension to just one post not all post
- URL Rewrite 404
- WordPress drop domain alias
- WordPress PHP error getting posts from another wordpress blog
- 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
- How to disable wordpress page rewrite rule?
- 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
- 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?
- URL Rewriting from a Plugin based on custom values
- 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
- Undefined property: stdClass::$ AND Trying to get property ‘name’ of non-object Error in plugin
- How to rewrite URL using .htaccess in WordPress Plugin
- Stop the user if login from the cookies