• Resolved fabwintle

    (@fabwintle)


    Hi,

    Thank you for a fabulous plugin. I am new to this so please bear with me – I have read and searched through the documentation but couldn’t find an answer that solved my problem.

    I would like the TML ‘register’ link on the login page and pop up to redirect to another URL than the built in ‘register’ one (as I am using Paid Memberships Pro and have created my own sign up page.

    Could you please advise?

    Thanks

    https://wordpress.org/plugins/theme-my-login/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Also looking for this solution too. Would be great if we can get an answer for this.

    To change this, you need to go into the database. Search wp_postmeta for the meta_key “_tml_action”. You’ll see meta rows for each of the pages TML creates. Change the post_id in the row where meta_value is “register”.

    To the plugin authors:

    This plugin would be improved by not automatically creating pages on activation–it’s very annoying if you already have these pages on your site, both because you don’t need new versions created that you then have to delete, and for the reason in this thread–it’s impossible to change them.

    You use shortcodes. You don’t need to also create pages–the purpose of shortcodes is that you can scan for which page has them in it. You could also have dropdowns on the options page to choose which page to use for which function. There are several ways to solve this that are better than creating pages that users don’t need and then forcing them to use them.

    Just a vote for this functionality… I am using Buddypress right now and need to use the buddypress registration page rather than the automatically generated page.

    This plugin has made my life easier so many times. I realize that you do this as a volunteer. Id be willing to either float a few bucks your way or participate in the dev any way that I could.

    Thanks for all your hard work here!

    Plugin Author Jeff Farthing

    (@jfarthing84)

    @cheekyboots Do you realize how intense it would be to “scan for each page conating the shortcode”? This is a severely bad idea. With that said, 7.0 will not be generating pages anymore. There will be pseudo pages.

    As for the original issue, just use the tml_action_url filter.

    function tml_action_url_filter( $url, $action ) {
        if ( 'register' == $action )
            $url = 'YOUR URL HERE';
        return $url;
    }
    add_filter( 'tml_action_url', 'tml_action_url_filter', 10, 2 );

    Um yeah… I posted too soon. While I would like the ease of a shortcode or a dropdown to assign the pages. You have provided a simple solution in the documentation. It can be found here for those looking.

    Simply copy and paste the code into your theme or even better, your child theme’s functions.php file and set the URL you’d like the registration link to go to.

    @jeff “scan for each page containing the shortcode” … But that’s exactly what shortcodes are – strings of text that WP scans for within the content of posts. Most plugins that use shortcodes, and WP itself, do not know which pages the shortcodes are on, so they have to scan each page for them. So I’m not sure how it would be “intense” to do that?

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Yes, shortcodes are parsed when they are displayed. You don’t scan through the entire database for shortcodes. TML needs to know exactly which pages are used for which action, in order to display the links to them, etc.

    I get you–it’s scanning all posts rather than one (or however many are on any given archive page). But isn’t this how the search function on most sites work – scanning all posts for the occurrence of one string? It’s one query.

    $query = new WP_Query( 's=[myshortcode]' );

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Yes, but search is a user-generated query that is run one time, on demand. Going by your logic, TML would have to run multiple full DB scans every pageload in which it is displayed.

    Anyway, as mentioned above, generated pages will not be used anymore with version 7.0.

    It’s only one “scan”, and it’s not the “full DB”– it’s looping through published pages one time.

    But there are lots of options that don’t require this search on every page load. You could check each page on save_post, and then store the setting. But anyway, it’s a moot point now.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change the URL of the register page’ is closed to new replies.