Home › Forums › Ticket Products › Event Tickets Plus › Change Buy Now button text
- This topic has 7 replies, 3 voices, and was last updated 6 years, 7 months ago by ksministries.
-
AuthorPosts
-
July 17, 2017 at 5:24 pm #1322388ksministriesParticipant
Hello would anyone know how we could change the Buy now text that is on the button in Event Tickets Plus list page? We have searched in each folder and file within Event Tickets Plus and The Event Calendar but could find not buy now text. We understand how to use the Themer’s Guide our problem is we cannot locate the correct file to copy.
We are also noticing that the same Buy now button is out of line with the price field. on our Storefront theme. Would anyone know how we might be able to target that element?
Thank you
July 18, 2017 at 7:39 pm #1323019JenniferKeymasterHello,
Thanks for reaching out! I’d be happy to help you out with this.
You can find the template to change the button text at wp-content/plugins/event-tickets/src/template-tags/tickets.php (line 234). From there you can change the text to whatever you’d like!
To fix that misalignment, add this to your Additional CSS area under Appearance > Customize:
Let me know how that works!
.tribe-events-event-cost form {
margin-bottom: 0;
}Thanks,
Jennifer
July 19, 2017 at 11:17 am #1323475ksministriesParticipantHi Jennifer I did not see anything on the line you mentioned though I did find something on line 220?
Robert Souza
Katie Souza MinistriesJuly 19, 2017 at 9:47 pm #1323675JenniferKeymasterHi Robert,
You are correct! Sorry about the discrepancy, but nice job finding the correct spot!
$button_label = esc_html_x( ‘Buy Now!‘, ‘list view buy now ticket button’, ‘event-tickets’ );
You can change Buy now to whatever you’d like.
Let me know if you have any other questions!
August 1, 2017 at 8:41 am #1328790John NiernbergerParticipantSorry, but this is terrible advice. Editing core files which will just get overwritten in the next upgrade is not a proper answer to this issue.
Unfortunately a proper answer isn’t easy to come by because of the way this was implemented – template-tags files aren’t made to overwritten like the view files are, and there doesn’t seem to be a filter I could easily find to override that function in a theme’s functions.php file.
So CSS is the best solution to avoid javascript. Put something like this in your child-theme’s css file (or wherever you make CSS additions), changing ‘Register Now’ to whatever you’d like:
.tribe-events-event-cost button.tribe-button {
text-indent: -9999px;
line-height: 0;
}.tribe-events-event-cost button.tribe-button:after {
visibility: visible;
content: “Register Now”;
display: block;
line-height: initial;
text-indent: 0;
}August 8, 2017 at 8:45 am #1332159JenniferKeymasterHi John,
Thanks for posting that solution! You are right, I should have mentioned that before. I looked at this again, and I wanted to offer a couple other suggestions as well. For a quick and easy solution, a plugin like Say What will let you change text strings on your site without having to get into the code at all. If you’d like to dive into the code, we actually do have a hook that will let you edit the HTML of the button: tribe_tickets_buy_button.
Sorry for the less than ideal answer originally, but I hope this helps! Please let me know if you have any questions.
Thanks,
Jennifer
August 30, 2017 at 9:35 am #1342433Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Change Buy Now button text’ is closed to new replies.