• Add-ons
  • Blog
  • Resources
    • Documentation
    • FAQs
    • Code snippets
    • Use cases
    • Support
  • Account
    • My account
    • Checkout
    • Cart
  • English
  • French
  • Add-ons
  • Blog
  • Resources
    • Documentation
    • FAQs
    • Code snippets
    • Use cases
    • Support
  • Account
    • My account
    • Checkout
    • Cart
  • English
  • French
home/Knowledge Base/Code snippets/Custom redirects

Custom redirects

720 views 0 April 13, 2021

If you want to redirect your users when they hit the “/customer-area/” page, you can create your own custom redirects by using that code:

function custom_cuar_change_default_customer_page_url( $redirect_to ) {
  return 'http://www.google.com'; // or could be get_permalink( 120 );
}
add_filter( 'cuar/routing/redirect/root-page-to-url?slug=customer-home', 'custom_cuar_change_default_customer_page_url' );

You could also redirect your users when they hit the dashboard. You just need to add the filter again, with a slightly different hook: cuar/routing/redirect/root-page-to-url?slug=customer-dashboard

Remember that the list of all slugs is available on the plugin status page (pages tab).

Make sure you do not delete any page, the plugin needs them to work properly. You can, however, remove them from your menu.

Was this helpful?

Yes  2 No
Related Articles
  • Custom admin notification’s recipients
  • Disable CSS resets and allow integration of third party plugins
  • Automatically add a user to a group
  • Changing the default page shown by the Customer Area
  • Changing the page shown after logout
  • Sidebars: how to disable them

Didn't find your answer? Contact Us

Knowledge base
  • Use cases 2
  • Community links 5
  • Code snippets 25
FAQ
  • About licences 7
  • Pre-sales questions 3
  • After-sales questions 1
  • Plugin usage 8
  • Technical questions 10
  • Payments 4
Documentations
  • Getting started
  • Using code snippets
  • The template system
  • Full documentation
Support
  • Pre-sales Enquiries
  • Main plugin support
  • Premium add-ons support
  • Feature Requests

  Automatically assign author as manager of a project

Change dashboard sections order  

  • Terms and conditions for sales
  • Refund policy
  • Privacy Policy
  • Legal notices
  • Copyright 2021 wp-customerarea.com. All Rights Reserved.