URL as a button for custom field

Home Forums Calendar Products Events Calendar PRO URL as a button for custom field

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1346768
    Ignacio Rodriguez
    Participant

    Hi everyone, I was able to follow this guide (https://theeventscalendar.com/knowledgebase/url-as-word-button/) successfully. My issues is that I’m trying to apply the same thinking to a custom field I have called ‘Attend Event’ and not the regular website URL. If you take a look at my page here (http://beta.nycsped.webfactional.com/event/test-conference-4/) you’ll see that the original solution is being applied to both URLs. How do I get that button on the Attend Event field only?

    Here’s the function I used:

    add_filter('tribe_get_event_website_link_label', 'tribe_get_event_website_link_label_default');
    function tribe_get_event_website_link_label_default ($label) {
    if( $label == tribe_get_event_website_url() ) {
    $label = "ATTEND EVENT";
    $class = "attend-event";
    }
    return '' . $label . ' ';
    }

    Thank in advance for any help!

    #1347713
    Cliff
    Member

    Hi, Ignacio.

    Are you saying you want the Event Website link to function as normal and only the Additional Field link to be affected by this button code?

    If yes, it looks like your code says “if the event website URL is the same as the Additional Field” — if you change it so the Event Website and the Additional Field URL are different, maybe it won’t happen?

    If you can’t figure it out, please send a screenshot of this event’s wp-admin edit screen, particularly these 2 fields.

    #1358412
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘URL as a button for custom field’ is closed to new replies.