It’s a little tricky with Buddypress. They are not using the WordPress way for rewrites. (https://buddypress.org/support/topic/custom-permalink-and-rewrite-rules-for-buddypress/) They are processing the url in their own module. If you have members
as the Buddypress members page slug and the rest of the url is not a Buddypress module it will redirect you to 404.
There is a way to fool their url process:
function it_job_rewrite_bp_uri($path) {
if(strpos($path, 'members/admin/jobs/it-jobs/create')) {
return 'members/admin/jobs/it-jobs-create';
}
return $path;
}
add_filter('bp_uri', 'it_job_rewrite_bp_uri');
The above code is working correctly only if you process the old url correctly. If you don’t want it processed by Buddypress simply return a path which is not a Buddypress url.
Related Posts:
- What do you think about custom designed plugin/theme options UIs?
- Is it necessary to bump a plug-in’s version if you’re just updating the “Tested up to” attribute?
- Adding Widget form fields dynamically
- Settings API updated messages won’t show if custom admin page not hooked into add_options_page()
- Custom action button in Gutenberg editor (post_submitbox_misc_actions – equivalent)
- Update a Plugin while maintaining back compatibility: general
- Do I need to use WP_Filesystem when creating a downloadable file on the fly?
- When wp_schedule_event action has two possible directions, how to avoid an infinite loop?
- The ideal place for storing persistent PHP objects
- Plugin development with unit tests
- Change WordPress.org hosted plugin readme.txt
- get_posts / WP_Query Memory size of 134217728 bytes exhausted
- WP_Error handles errors, but how can I show success with a message?
- `wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin
- Sessions not creating correctly in custom function
- Problem with `wp_mail()`
- How to add meta boxes to the ‘Add new post’ screen?
- Load WooCommerce templates from my plugin folder first
- How to determine wordpress base path when wordpress core is not loaded
- Calling a function from functions.php in custom page/ blog post
- add_menu_page() with function inside a class [duplicate]
- Overwrite default XMLRPC function from plugin
- Cannot modify header information – headers already sent by pluggable.php
- htmlentities and editing text
- Gutenberg registerFormatType with Multiple Classes
- Translate strings not recognised in plugin
- Best way to notify WordPress plugin users of new release candidates for beta testing?
- How to update total price of completed order in woocommerce? [closed]
- How do I add a custom sublevel menu specified in one directory to a custom top level menu specified in another directory?
- wp_localize_script and host/browser cache
- How to run a external JavaScript file on wp-admin if admin, and other if normal user?
- Get a custom table to an array
- How to use WP_Term with (menu) argument in the wp_nav_menu?
- Turn off Admin Bar (Toolbar) in backend – no easy way
- When to use add_settings_section vs just register_setting?
- How to customize login process
- How should I store a log for my plugin
- Adding more text to a post, after it was published
- How to modify the comments to be displayed in a post?
- what is the difference between these phares?
- WP_Query filters
- Plugin Architecture Question: How to avoid using transients
- SSL certificate verify failed
- How to load library scripts in admin from plugins in noConflict wrapper?
- wordpress how to query wp_options table
- rest_no_route on custom API endpoint wordpress
- How to query custom db table?
- How to only load css for used blocks on frontend
- adding wp-cli commands to plugin: how to document to users?
- Creating an empty page programatically
- Multiple API Endpoints (wp_remote_get)
- plugin_dir_url & plugin_basename not working when plugin dir is outside wordpress dir
- How to replace default comments with custom HTML?
- Invalid hook call on save, not edit when using swiper slider
- Call to undefined function is_home() or any conditional tags
- WooCommerce Endpoints content
- Make dynamic string translatable
- wp_schedule_event is registered but function isn’t running
- Simple plugin don’t display content
- Cannot output plugin twice with shortcode
- How to make an admin plugin menu page go full screen?
- Gutenberg – Call google map render function in save after DOM has been rendered
- Woocommerce get_term_by() in transition_post_status hook doesn’t works
- Does $this context change in an AJAX callback?
- Home page is not loading, where in other pages are displaying on the site
- Custom table / Alternative to WP_List_Table
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- Adding Amchart Interface to WordPress API
- WordPress with React: Saving and Using Data Collected with fetch
- bindParam? WordPress 4.9.5 SQL LIKE statement %s and %LIKE%
- tweaking the
- Plugin with functions inside a class & how to trigger WP CRON
- User Registration Moderate
- external Integration with wordpress timeout error
- add_settings_error on validating plugin options API
- Implementing Select2 plugin into WordPress
- Problem to return more than single line captions
- Unable to show a message after plugin activation
- Use plupload to upload images and save them to custom folder and database table
- Slug is not shown for my custom post type
- wp_register_sidebar_widget in loop within a plugin?
- Attach an image to new posts
- Adding parent custom post type menu option
- How to plugin function code move to theme function.php ? I’ve tried below code but not working [closed]
- Safe XML response from wordpress plugin
- Gutenberg: – Call a function after Server Side Component is rendered
- How are themes and plugins localized using the gettext GNU framework?
- Theme, Plugin or Both?
- Accept only PDF file for upload
- WordPress upload path decalration
- Add a custom image source
- filter on get_posts efficiently
- How to get custom user meta by id in custom Gutenberg block
- How to prepend a header section to all pages related to my WordPress Plugin
- How to access Elementor-navigation-elements via jQuery
- Hook a search form anywhere on the site, using a custom plugin
- Plugin forms overwrite each other’s options
- ACF – programmatically install and activate in pipeline to automate testing for custom plugin development?
- How can I include React useState in a custom gutenberg block plugin?
- Problem with Owl Carousel, infinite loop [closed]