Support » Fixing WordPress » Login redirect set up, simulate click when page reached?

  • amperandsand


    Each user, except Admin, will only have one post each, a custom post type – which is a questionnaire fill-out. I already have the login redirecting to the custom post type page, but I’d like to go one step further and make it really easy for the user.

    If they are logging in for the first time, it would continue to redirect them to the custom post type page, but also auto click on the add custom post type button.

    If they have already begun the questionnaire, it would auto click the edit button.

    I have an auto click working elsewhere, but it’s being triggered by a live click on another button. All script is in functions.php

    Here’s my login-redirect:

    add_filter(‘login_redirect’, ‘plugin_admin_redirect’);
    function plugin_admin_redirect($redirect_to, $url_redirect_to = ”, $user = null) {
    return ‘’;

    I’ve tried using document ready then jQuery(“.row-actions”).find(“.edit”).click(); but it’s not working. Neither is this: jQuery(“.row-actions”).find(“.edit”).trigger(‘click’);

    This function works elsewhere for a different function:

    jQuery(‘.steps-button’).live(‘click’, function() {

  • The topic ‘Login redirect set up, simulate click when page reached?’ is closed to new replies.