• Hi. I have a custom login/reg page that’s created by a plugin, the URL is ‘stage.bringit.ph/seller’.

    I want to change/re-map this URL to ‘stag.bringit.ph/register’. Because the word ‘seller’ is misleading for the end user (I’m not in the business of selling).

    But id like to do it superficially only, ie, the user will only see this new URL on their browser URL box. But the code and plugin will continue using ‘/seller’ in the backend. That is because the page and directory has a lot of dependencies, and there is also no UI for this page that I can edit visually (it’s all coded in in a PHP file), there’s no option for me to change page slug, etc.

    I’m at wit’s end – any help would be appreciated!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    The solution depends on how the plugin knows to process a /seller/ request. A likely solution would be to use the “request” filter. It should watch for a request for pagename = register. When encountered, change the value to “seller”. The request should be processed as for “seller”, but the browser URL will remain /register/.

    You will need a published page whose slug is “register” though it will never be displayed on the front end due to the request alteration. Without such a named page, WP will return 404.

    Thread Starter justinnb

    (@justinnb)

    Can you share how to go about it?

    Moderator bcworkz

    (@bcworkz)

    Something like this (untested, making a big assumption about the plugin’s page):

    add_filter('request', 'wpfo_seller_alias', 2 );
    function wpfo_seller_alias( $query_vars ) {
      if ( 'register' == $query_vars['pagename']) { // page 'register' must actually exist even though it's not used
          $query_vars['pagename'] = 'seller';
      }
      return $query_vars;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Rename URL’ is closed to new replies.