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]
- Is there a way to decide from init whether we are on a certain backend page?
- Can a WordPress plugin add read-only pages?
- Remove Default Blogroll Links via Plugin script
- Encoding Method for URLs?
- Store custom meta box data as serialized array
- Catching Gutenberg sidebar switch event
- How To Update WordPress Custom Plugin For Customer? [closed]
- Using Product variations as product addons
- Translate javascript with WordPress built-in localization API for static strings
- Can’t retrieve body params from PUT endpoint using formdata
- PHP File_exist() not working – Checking if File Exist in WordPress Theme Directory
- Can we intercept user_login and user_pass from a wp_login_form?
- Empty Pdf file generated with FPDF library in WordPress plugin [closed]
- Woocommerce inventory [closed]
- enabling Twig as Template Engine withing own plugin [closed]
- $wpdb->update() always need a second try
- WordPress: How to rename the main php plugin base file?
- Unable to get a simple plugin admin page to work
- Hook after attachment added and cropped
- Hook add_attachment error
- Filter for admin (back end) ‘reply to’ comment
- Why would you use esc_attr() on internal functions?
- How to get custom post_author?
- Invalid hook call on save, not edit when using swiper slider
- Undefined variable’s error when expected to have passed the content of variable [closed]
- How best to handle database version dependence (from $wp_db_version)
- Proper way to use useSelect
- Call to undefined function is_home() or any conditional tags
- Associate multiple email addresses with the same user account, so they can log in with either
- Use npm and wp-env to make production bundle
- How to grab query string from wp-content/uploads/.*
- Will I get an error if I try unscheduling a WP Cron scheduled task that wasn’t scheduled?
- Conditional Generation of Image Sizes using add_image_size
- Looking for a better way to initiate cron job
- Plugins and caching
- How to call a function using a shortcode [closed]
- How to create templates for a custom module to show on the front end within my theme?
- How to add template colors to custom block options in WordPress Gutenberg editor sidebar?
- shortcode executed in the page editor
- Google credentials and redirect URI for Google OAuth2 in a WordPress plugin, questions
- How to add plugin options in wp editor page
- WP: Search and replace in DB programmatically
- WooCommerce change Tax Class programmatically when Recalculating an existing Order [closed]
- WP nonce field checkbox prints checked=’checked’ outside input field
- How to silent ‘Attempting a database schema change is discouraged.’?
- Plugin header: WP and PHP version control uses wp_die(), can I change that?