You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.
I tried to go live with a WordCamp announcement post, but the camptix shortcode was only working on pages. I had it in a footer widget too, but that would only work on pages. Now I see why
If it's impossible to remove the is_page check, can we have a "Error: This shortcode only work on pages" message instead of "An error has occurred"
The text was updated successfully, but these errors were encountered:
@tomjn CampTix predates me by a lot, so I don't really know the reasoning behind limiting the shortcode to pages, but here's my take:
The way it's set up, the output of the shortcode changes depending on where in the ticket purchase flow you are. The relevant bit is here. So sometimes it includes a lot of content/markup/scripts/whatever, and sometimes it's fairly simple. Because of this variability, it doesn't work well to have that shortcode embedded in a sidebar or footer widget. And I'm guessing that the reason it only works on pages, and not posts, is just a semantic thing. Ticket checkout and payment are things you usually find on a static page somewhere, not in a blog post that has a context within a chronologic timeline.
If the architecture of CampTix was different, perhaps it would be possible and make sense to be able to embed a "Buy Ticket" widget anywhere. But again, this is just my take.
If we had an option that let you pick the tickets page then all ticket forms would submit there and the form flow would work regardless of where it started!
For now I've used a link to the tickets page with special styling, but the shrotcodes error message could do with mentioning it only works on pages
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
camptix/camptix.php
Line 4871 in f807250
I tried to go live with a WordCamp announcement post, but the camptix shortcode was only working on pages. I had it in a footer widget too, but that would only work on pages. Now I see why
If it's impossible to remove the
is_page
check, can we have a "Error: This shortcode only work on pages" message instead of "An error has occurred"The text was updated successfully, but these errors were encountered: