Wow. The answer was ridiculously easy. All you need to specify in the rewrite rule is the pagename
attribute.
So,
add_rewrite_rule('kb/(.+)/(.+)/?', 'index.php?pagename=docs-article&docs_category=$matches[1]&docs_article=$matches[2]', 'top');
Loads a page with the slug docs-article
.
Related Posts:
- Get page content using slug
- Change the_title() of a page dynamically
- Using query_vars filter
- How to edit the properties of a page programmatically?
- Pages 404 in wordpress
- How to create a dynamic page based on form data with a plugin?
- Use an empty page to build custom plugin output
- Is it possible for a plugin to register a page template file?
- Dropdown list of pages to get page id to store in plugin options
- Calling a function from functions.php in custom page/ blog post
- How do I approach removing menu items on the fly based on settings in my plugin?
- Set a specific page as 404 – not found via my own plugin
- Create a Page via plugin
- Get a custom table to an array
- Secure Pages Best Practice
- $paged always 0 on plugin’s custom page
- WordPress pre_get_posts with combined results of two queries (OR)
- Plugin generated virtual pages
- Admin Posts List (edit.php) by post IDs
- wp_get_post_terms Order by not working
- Prevent WordPress automatically processing certain URL queries
- Add Password Generator on password protected page
- ECHO Executing 4 Times In Head
- Why in this archive page that call query_posts() function show only the last 10 posts?
- insert query on a custom table using ajax with jQuery plugin Jeditable
- WordPress pages are not published due to External database connection with WPDB class
- Create page (not the post type) dynamically
- Multiple array for post_content on plugin activation
- Taxonomy archive page listing terms instead of posts
- How to list all images used on a specific page?
- Create fixed static pages
- Brainstorm – Slow Query from Plugin Need to Speed It Up
- Checking for existing title in custom db query not working
- Set page to draft on plugin deactivation
- How to create archive page to add in menu
- How to grab data after wp user search is complete
- WP_Query not ordering correctly
- Plugin frontend page design irrespective of the theme used
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- Custom non-template page on front end fails to render
- bindParam? WordPress 4.9.5 SQL LIKE statement %s and %LIKE%
- WP Query Relations / Compare
- Array/List Edit in Backend
- How do I control the list of Pages an author can see?
- How to add conent (text) to Add New pages form of admin in WordPress
- auto create only 1 wp page in activate custom plugin
- Add query string variables to all hyperlinks URL matching a specified domain
- Create pages for authors
- How do I use (or mimic) document.getElementById() on a page loaded from WordPress database?
- Using a Page Template Not in Theme
- Checking if the query is empty does not work
- Can I log the searches that are returning 404 in the DB?
- Generating Multiple Divi Pages from Database
- Problem with Owl Carousel, infinite loop [closed]
- Custom Widget function in Plugin not working?
- Single functions.php or split into many small files?
- Accessing plugin settings in gutenberg
- Managing two editable fields in gutenberg
- Naming Admin Menus and Submenus
- How to register activation and deactivation hook in plugin using OOP pattern
- Does add_filter work outside functions.php
- Change reset password URL returned by wp_lostpassword_url() via plugin
- Plugin development: How many plugin and WordPress version combinations to support?
- dbDelta() Error – Incorrect index name ” for query ALTER TABLE
- WordPress allows multiple users to have same email ID; and I’ve a problem with it!
- wordpress add_submenu_page adds broken link
- WP Enqueue style on all plug-in pages
- How do I find the page/url where a search came from when using pre_get_posts filter?
- How to automatically activate a plugin on install
- How to show comments from different Plugins to same post type?
- The plugin generated 683 characters of unexpected output during activation
- Dont display post with no content
- Custom Admin Plugin – Injecting repeatable select fields (add, remove) into an Ordered List
- woocommerce single product page hook not working
- How do I build a settings panel under the plugin
- Multiple Users Logged In Causing Incorrect Account Returned
- I want to display the content of a text field only if it has been entered
- How do i code exit popup plugin?
- Remove default wordpress roles
- What is the meta_query key name for the woo product average rating? [closed]
- how to catch a data from a array in WordPress
- get the queried_object of an url
- Advanced Custom Fields conflicting with custom plugin when saving custom field
- Need someone to help you want to manage points for members to code interface functions? thank you
- Call API on post save/update and show the result in admin area
- Is there any other ways to replicating changes on live from staging without pushing from git
- Meta box not displaying on the plugin page
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- External api call using wordpress
- Set link dialog to open in blank by default
- plugabble wp_authenticate function not works from wp-login.php
- How to get recent one post from each category on home page?
- WordPress plugin boilerplate AJAX functionality
- Run different permission_callback depending on HTTP method of custom REST API endpoint
- upload image to wordpress media library failed for custom post type
- Fetch Custom Woocomerce filed data and check the data avialble in Wp-user table as nicname or username using function.php
- How to get locale within WP REST Request?
- How to add extra EXIF data when images are uploaded?
- How to boost WP custom post REST API GET queries by custom taxonomies
- I want to redirect user to an amazon product page from my wordpress website when they add product to there cart [closed]