• Resolved workmanagmenttools

    (@workmanagmenttools)


    When a user views a board and isn’t logged in, they see the ‘Login’ button.

    Is there any way to customize where this links to per board?

    This is a bit or a work-around to a problem you’ve already solved (redirecting the user back to the board after they log in). I just don’t have the skills to set a dynamic redirect with the user registration plugin I’m using (‘User Registration’), so I was going to create 2 separate login pages, and enter a different redirect for each.

    Appreciate your help, and this plugin has been a lifesaver! Thank you!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @workmanagmenttools,

    In the plugin settings, please go to the IdeaPush support tab and the question “I am a developer, do you provide any filters?”

    There’s a filter to modify the login link. We don’t have a parameter for the board ID yet for this filter, but you could use global $post in your code to get the post ID and that way you could modify the link on a board by board basis.

    Now if what I said makes no sense, you need to get a developer, or please consider getting the pro version and I can provide a code sample for you and instructions on how to use the code.

    Thanks,

    Thread Starter workmanagmenttools

    (@workmanagmenttools)

    Cheers for the quick reply, much appreciated! And yes, got the pro version now, needed it for multiple boards anyway.

    I followed just enough to think I might be able to google it, but no, I’m pretty lost.
    I understand that I’d need to add something to functions.php that only applies to 1 page based on checking the ID, and then uses the filter you provide, which I found and was able to use generally.

    If you could share how to couch it so it only applies to 1 page, that would be much appreciated!

    Thread Starter workmanagmenttools

    (@workmanagmenttools)

    Ah, no, think I got it:

    //Change IdeaPush Login Links
    add_filter(‘the_content’, ‘specific_login_redirect’, 9);
    function specific_login_redirect($content) {
    if (is_page(‘Power User Voting’)) {
    add_filter( “idea_push_change_login_link”, “idea_push_change_login_link_callback”, 10, 1 );
    function idea_push_change_login_link_callback( $link ) { return “https://workmanagement.tools/power-user-login/”;
    }
    return $content;
    } else {
    return $content;
    }
    }

    add_filter(‘the_content’, ‘courses_login_redirect’, 9);
    function courses_login_redirect($content) {
    if (is_page(‘Next Courses’)) {
    add_filter( “idea_push_change_login_link”, “idea_push_change_login_link_callback”, 10, 1 );
    function idea_push_change_login_link_callback( $link ) { return “https://workmanagement.tools/login/”;
    }
    return $content;
    } else {
    return $content;
    }
    }`

    Plugin Author Northern Beaches Websites

    (@northernbeacheswebsites)

    Hi @workmanagmenttools,

    Did you manage to work this out? If you have the pro version, you are welcome to submit a request here: https://northernbeacheswebsites.com.au/support/

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Customize where ‘Login’ button links to’ is closed to new replies.