Forum Replies Created
-
AuthorPosts
-
January 15, 2017 at 9:59 am in reply to: Moving the "You have xx ticket" block (for logged in user) #1218783
Chris
ParticipantExcellent! That code did the trick, moving the “You’ve got tickets” block to a position above the event description (and below the Buy Tickets block, which I’d already relocated via the configuration settings) – enabling a logged-in user to see whether they had already purchased a ticket/s for the event.
Elegant solution!
I was able to use the My Custom Functions plugin by Arthur Gareginyan to apply the function, to isolate it from theme updates.
January 11, 2017 at 5:53 pm in reply to: Moving the "You have xx ticket" block (for logged in user) #1217088Chris
ParticipantHmmm … I see that since I originally modified my functions.php code to implement moving the RSVP or Tickets block, that in v4.4 the ability to do that has been kindly provided for in the plugin Settings (Events –> Settings –> Tickets tab), however this does not include the “You have tickets” notice still located at the bottom of the page (for a logged-in user who has previously purchased tickets or RSVP’d for the single event being viewed).
The reference to the “tribe_events_single_event_after_the_meta on priority 4” doesn’t fully provide the solution (at least for me without that level of coding knowledge or skill).
I guess what I am looking for is a complete snippet that could be added to the functions to move that notice block to the top of the page, something like this (which was the code previously offered to move the RSVP/Tickets block before it was most recently added as a Setting):
if ( class_exists( 'Tribe__Tickets__RSVP' ) ) { // Remove the form from its default location (after the meta). remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets__RSVP::get_instance(), 'front_end_tickets_form' ), 5 ); } if ( class_exists( 'Tribe__Tickets__RSVP' ) ) { // Add the form to its new location (before the content). add_action( 'tribe_events_single_event_before_the_content', array( Tribe__Tickets__RSVP::get_instance(), 'front_end_tickets_form' ), 10 ); } if ( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) { // Remove the form from its default location (after the meta). remove_action( 'tribe_events_single_event_after_the_meta', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form' ), 5 ); } if ( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) { // Place the form in the new location (before the content). add_action( 'tribe_events_single_event_before_the_content', array( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), 'front_end_tickets_form' ), 10 ); }-
This reply was modified 9 years, 4 months ago by
Chris.
January 10, 2017 at 10:35 am in reply to: Moving the "You have xx ticket" block (for logged in user) #1216011Chris
ParticipantThank you for the response.
I have already moved the RSVP and Tickets blocks to a position above the Event description/content (as per the above-linked instructions), however the “You already have tickets” message is still at the very end of the page, so it is apparently a separate code block and not a part of the RSVP/Tickets block.
The red border is a great idea, but I still need to get the block to a more accessible/visible position.
Some sort of page templating system that would allow a custom page layout to be built using shortcodes to place each element on the page where desired (or to leave it off) would be a great system. For now I’ve no problem using functions to accomplish the same thing, if I can find out the right classes/code to use.
-
This reply was modified 9 years, 4 months ago by
-
AuthorPosts
