Redirect to listing after creating an account as a regular user

Hey guys!

When a user goes to a listing through a link, and they do not have an account, they need to register an account.

So far so good, and it’s perfect. The problem is that when he creates an account, he is not redirected to the page he was on previously.

Is there any way, so that, after creating an account, the user returns to the listing page he was on?

Hi,

Please check these topic: How to add custom redirect for user after login - #3, Redirect to custom success page after registration form is submitted

​I hope this is helpful to you.

Well, I need that, when a user without an account enters the site via a link, they return to the same page after registering. In this case, my customizable link would be the previous link he accessed.

Example:

My website is evonegocio.com. I accessed it via the link https://evonegocio.com/listing/agenda-compromissos-pessoais/

If I don’t have a registration, to be able to schedule, I need to register. I need to go back to https://evonegocio.com/listing/agenda-compromissos-pessoais/ after registering.

What happens is that this link is variable. Not all users will access the site through the same link.

In other words, I need a regular user to return to the login page. What code could I use?

Could this code below work if instead of placing a customizable link, you place it to return to the previous page?

Remembering that the only flow I want to change is when a regular user registers.

When a vendor wants to create their listing, the flow remains.

add_filter(
 'hivepress/v1/forms/user_register',
 function($form){
  $form['redirect'] = 'custom url here';
  return $form;
 },
 1000
);

Hi,

Sorry for the inconvenience, but customization is beyond our support scope - it includes fixing bugs and guidance about the available features Support Policy | HivePress

If customizations are required for your site, please try customizing it using the collection of code snippets Search · user:hivepress · GitHub and other developer resources, or consider hiring someone for custom work https://fvrr.co/32e7LvY

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.