Change Buy Now button text

Home Forums Ticket Products Event Tickets Plus Change Buy Now button text

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1322388
    ksministries
    Participant

    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

    #1323019
    Jennifer
    Keymaster

    Hello,

    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

    #1323475
    ksministries
    Participant

    Hi Jennifer I did not see anything on the line you mentioned though I did find something on line 220?

    Robert Souza
    Katie Souza Ministries

    #1323675
    Jennifer
    Keymaster

    Hi 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!

     

    #1328790
    John Niernberger
    Participant

    Sorry, 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;
    }

    #1332159
    Jennifer
    Keymaster

    Hi 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

    #1342433
    Support Droid
    Keymaster

    Hey 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Change Buy Now button text’ is closed to new replies.