Help setting up the redirect page after appt. confirmation

I visited the archives and found some similar questions regarding this topic which were able to get me as far as adding the necessary code to my functions.php file. I had a parse error, and fixed that. However, my issue is about what happens after I add the code to the functions.php; when

function app_redirect( $script ){?return
str_replace("window.location.href=app_location()", "'_blank' href=''", $script);
add_filter( 'app_footer_scripts', 'app_redirect' );

is placed just after the opening <?php tag as suggested, it makes the appointment selection part of the process not clickable. The appointment calendar displays available times in the appropriate colors, but nothing on the calendar is clickable, and the time slots do not appear (since clicks aren't registering). This makes it impossible to schedule an appointment.

When I removed the code listed above from the functions.php file, the functionality of the calendar, time slots, etc. was restored.
I'm sure it's simply a matter of my not knowing much about coding, and that there's a simple fix within those lines of code.

Thanks for your help.

  • k
    • WPMU DEV Initiate

    Thanks for the speedy response!

    Yes, I've already checked out that link—that is one of the pages I was looking at to solve the parse error—that part has been resolved.

    What I'm trying to resolve now is the lost functionality of the calendar when that code is inserted into functions.php. Everything about the calendar LOOKS normal, but you can't click on any of the days. The hover function works fine, but clicking does not. Therefore, no time slots appear, and no appointment can be scheduled.

  • k
    • WPMU DEV Initiate

    After coming up with repeated parse errors, even after I made the code plain text and copy/pasted it in from text editor, I manually typed in the code, and that cleared up the parse error. Would having extra spaces in the code cause the calendar to malfunction?

  • k
    • WPMU DEV Initiate

    I just saw this post...she is experiencing the same problem that I am:

    In response to your post on that page, I added the code where i was directed to, just after the <php? opening tag. I don't think it is necessary to reinstall the theme since I've been able to restore the original functions.php file and it takes care of the calendar malfunction. I also do not want to reinstall the theme...I haven't even gotten to launch the site yet because I'm trying to resolve this issue, and I don't want to throw my work out the window for something like this.

    It seems like the ability to specify a page redirect after an appointment confirmation is a feature that most people would expect to have included in an appointment plug-in.

    Please let me know specifically about the amount of spaces that should or shouldn't be in the lines of code inserted into the functions.php file, or if there is some revised code I can add.

  • k
    • WPMU DEV Initiate

    Would love a response to this kerfuffle...need to make sure calendar works AND clients are redirected to a confirmation page. Right now, can only make calendar work when there is no confirmation page redirect.


  • PC
    • WPMU DEV Initiate

    Hey There,

    Sorry to have missed your last few responses.

    Right now, can only make calendar work when there is no confirmation page redirect.

    I have asked our lead developer @Vladislav to chime in here. In the meantime, can you kindly paste the code here using code tags in the post editor ?

    Cheers, PC

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.