The link you’ve giving is for the function add_rewrite_tag()
not WP_Rewrite::add_rewrite_tag()
Codex.
The later documentation is a bit misleading because it links the other global function (which has two arguments) as if it was the same. But the function you’re referring to has three arguments.
I updated the codex a bit to make this more clear.
Related Posts:
- Custom frontend page for plugin without a ‘physical’ page?
- How to Rewrite WordPress URL for a Plugin
- External Rewrite Rules
- Rewrite url for existing page without flush_rewrite_rules
- Does WP Have a Function To Generate .htaccess RewriteCond?
- How to restore WP 5.4 behaviour where a numeric string could added to each page URL and parsed as “page” in WP 5.5?
- How to change the URL pattern for single post view
- Why doesn’t flush_rewrite_rules run on plugin activation?
- Custom url for a plugin page add_rewrite_rule WordPress
- How To Consistently Enforce Rewrite Rule in Plugin Development
- Help With Rewrite_Rules For a Custom Plug-In
- Adding rewrite rule dynamically
- rewrite URL based on selected taxonomy for post page
- WordPress Custom URL
- Problem with dinamic add_rewrite_rule()
- add_rewrite_rule behaving strangely
- HowTo to add my rewrite rules at the beginning, redirect to the right page and flush the rules on plugin activation?
- How to grab query string from wp-content/uploads/.*
- How can I add rewrite rules to a class-based plugin?
- configuration of .htaccess for add_rewrite_rule to make sense
- Plugin architecture to pull from API & create dynamic content on WP site?
- How to link to custom “archive like” page with custom permalink rules “dynamically”
- Access to the template file of a plug-in
- Rewrite not working since upgrade to 5.9
- Custom post type change permalink query
- Add variables from rewrite rules to query var
- WordPress: I wanted to use Add rewrite rule multiple times for multiple CPT in my plugin
- WordPress Own Rewrite Rules
- Using meta_key & meta_value in add_rewrite_rule
- Any way to make Apache’s internal redirect work?
- How can I map a specific URL pattern to a plugin for processing
- Custom slug in url for CPT and taxonomy
- add_rewrite_rule not working
- How to Rewrite WordPress URL for a Plugin
- Virtual Page with Registration form
- How to Rewrite WordPress URL for a Plugin
- URL rewrite parameter lost (add_rewrite_rule)
- Objective Best Practices for Plugin Development? [closed]
- add_menu_page() with different name for first submenu item
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- How to include PHP files in plugins the correct way
- How can I add an image upload field directly to a custom write panel?
- A tool to analyze rewrite rules? [closed]
- Difference Between Filter and Action Hooks?
- framework for plugin/theme options panel? [closed]
- Creating a table in the admin-style?
- How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Settings API with arrays example
- How to get the path to the current theme?
- How to make a plugin require another plugin?
- ajaxurl not defined on front end
- What process do you use for WordPress development? [closed]
- What’s the difference between term_id and term_taxonomy_id
- Should I use wpdb prepare?
- Why does WordPress use outdated jQuery v1.12.4?
- Post meta vs separate database tables
- Is there any plugin development framework
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- How to add a javascript snippet to the footer that requires jQuery
- Enhance Media Manager for Gallery
- How do I create a custom role capability?
- How do I add CSS options to my plugin without using inline styles?
- How do i best handle custom plugin page actions?
- Adding Custom Text Patterns in the WP 4.5 Visual Editor
- Automatically determine minimum WordPress version required for a plugin?
- What is the advantage of using wp_mail?
- How to make a WordPress plugin translation ready?
- How many times will this code run? (or, how rich is grandma?)
- How to create an API for my plugin?
- Is it ever okay to include inline CSS in plugins?
- Plugins in symlinked directories?
- How to override existing plugin action with new action
- How to include a file using get_template_part() in a plugin?
- Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1
- How to store username and password to API in wordpress option DB?
- Custom pages with plugin
- body_class hook for admin pages
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Is it mandatory to use $wpdb->prefix in custom tables
- Which hook should be used to add an action containing a redirect?
- add_action hook for completely new post?
- Why does WordPress add 0 (zero) to an Ajax response?
- What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
- How to enqueue JavaScripts in a plugin
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Plugin Form Submission Best Practice
- How to redirect to settings page once the plugin is activated?
- Is get_option function cached?
- Should Plugin Folders Include a Blank index.php File?
- Unit testing for plugin development
- Methods of Integrating Plugin Data with Themes
- What is the wordpress wp-includes folder for?
- WordPress Update Plugin Hook/Action? Since 3.9
- How to include jQuery and JavaScript files correctly?
- How come `wp_options` table does not have an index on `autoload`?
- PHP error with shortcode handler from a class
- Update Option Stored in Multi-Dimensional Array
- check if Gutenberg is currently in use
- Best way to abort plugin in case of insufficient PHP version?
- WordPress Plugin Development – Headers Already Sent Message