0
votes

I am using wordpress Theme My Login plugin, I need three different forms for three different roles. I have created forms and added the shortcode to different pages created for registration. The issue I am facing is all the forms have the form action URL is '/register', so when a form submission failed and return error page will be redirected to /register page, not the page the form actually placed. How can I prevent this action, How can I set the action url? is there any option or any filter?

2
you want to change submit url or fallback url?Vasim Shaikh

2 Answers

0
votes

Currently TML have some analogy with older version. you could use something like below:

function login_redirect() {
    global $post;
    $post_slug=$post->post_name;
    if(!is_user_logged_in() && /*Which ever condition you require*/ ){
           //Your redirectional page

    } }

// add the block of code above to the WordPress template add_action( 'wp', 'login_redirect' );
0
votes

After digging into the Plugin code, I got this filter:

tml_get_action_url

and using some custom checking I am able to achieve what I want.