Duplicate RSVP form so it appears on top and bottom of event page

Home Forums Ticket Products Event Tickets Plus Duplicate RSVP form so it appears on top and bottom of event page

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1121446
    Jerry
    Participant

    Wondering if this might be possible. Many of my users intend to RSVP when they arrive on the page so it would be nice to have the form at the top, and for those who want to see the graphics and read the full description it would be nice to still have it on the bottom. I did see the Move the Form post and code (https://theeventscalendar.com/knowledgebase/moving-the-ticket-form/).

    Thought I’d ask if top and bottom positions were possible.

    Thanks for what you have made.

    #1121589
    Josh
    Participant

    Hey Jerry,

    Sure thing!

    You can accomplish this by adding the following to your theme’s functions.php file. This is essentially the same as the linked article, however it doesn’t first remove the current version of the form that is below the content.

    
    if( class_exists( 'Tribe__Tickets_RSVP' ) {
    add_action( 'tribe_events_single_event_before_the_content', array( Tribe__Tickets__RSVP::get_instance(), 'front_end_tickets_form' ) );
    }
    

    Let me know if this helps.

    Thanks!

    #1121885
    Jerry
    Participant

    Hey Josh

    Thanks for the swift reply. When I place the code in the functions.php file in my child theme, the site is a white out (no site). I have tried it in several places in the functions.php file with no success. I am including the file for your reference.

    Thanks for your help.

    <?php
    // Exit if accessed directly
    if ( !defined( ‘ABSPATH’ ) ) exit;

    // BEGIN CTC ENQUEUE PLUGIN ACTION
    // AUTO GENERATED – Do not modify or remove comment markers above or below
    if ( !function_exists( ‘chld_thm_cfg_plugin_css’ ) ):
    function chld_thm_cfg_plugin_css() {
    wp_enqueue_style( ‘chld_thm_cfg_plugins’, trailingslashit( get_stylesheet_directory_uri() ) . ‘ctc-plugins.css’ );
    }
    endif;
    // using high priority so plugin custom styles load last.
    add_action( ‘wp_print_styles’, ‘chld_thm_cfg_plugin_css’, 9999 );

    // END CTC ENQUEUE PLUGIN ACTION

    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED – Do not modify or remove comment markers above or below:

    if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
    function chld_thm_cfg_parent_css() {
    wp_enqueue_style( ‘chld_thm_cfg_parent’, trailingslashit( get_template_directory_uri() ) . ‘style.css’, array( ) );
    }
    endif;
    add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’, 10 );

    if ( !function_exists( ‘child_theme_configurator_css’ ) ):
    function child_theme_configurator_css() {
    wp_enqueue_style( ‘chld_thm_cfg_separate’, trailingslashit( get_stylesheet_directory_uri() ) . ‘ctc-style.css’, array( ‘chld_thm_cfg_parent’,’divi-style’,’et-shortcodes-css’,’magnific-popup’ ) );
    }
    endif;
    add_action( ‘wp_enqueue_scripts’, ‘child_theme_configurator_css’ );

    // END ENQUEUE PARENT ACTION

    #1122095
    Josh
    Participant

    Hey Jerry,

    I apologize there. Looks like I was missing a closing “)” there. I’ve updated the snippet and this should address the initial white screen issues.

    Thanks!

    #1122447
    Jerry
    Participant

    Hey Josh

    Very excited to try the solution, but it did the same thing, returned a white screen. Tried it in several places with the same result. I activated the main theme instead of the child wondering if there was a flaw in the child theme that mucked up the code. Same result.

    Thank you again for helping to sort this out.

    Be well,

    Jerry

    #1123311
    Josh
    Participant

    Hey Jerry,

    Put it in an editor to check the syntax and looks like I had lost another “)” in the switch. Here is the full snippet that should work to move the form.

    https://gist.github.com/BeardedGinger/b3146d7a08f466fc09b75780a1c87cdc

    Been doing some testing on it and unfortunately I’m struggling to get the form to show up twice on the page. Will reach out to our team today to see if there are any known hiccups with trying to use multiple forms on a single page.

    Thanks!

    #1123686
    Jerry
    Participant

    Hey Josh

    Thank you. That moved the form up underneath my poster, which for me is way better than it being below the maps and such. I too experienced the one form per page result. I hope they will find a way to put it twice, but I am very happy having moved it up the page. Odd that it did not put it before all content, as in, my art comes first, then the tickets, then, details, then map.

    I appreciate you sticking with it to find the missing bits to move it up the ramp.

    Thank you again,

    Jerry

    #1123799
    Josh
    Participant

    Hey Jerry,

    Awesome! I’m glad we were able to make the layout there better for you.

    The Featured image there is just above that content hook that we’re using there. There isn’t a direct hook within that template to output the forms above that using the same approach but there could be a way to move it higher if that was important to you.

    Thanks!

    #1130979
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Duplicate RSVP form so it appears on top and bottom of event page’ is closed to new replies.