I am trying to make the event website url appear as a button instead of a url link. I am running Events Calendar + Events Calendar PRO. I have followed the instructions provided in the events calendar knowledgebase (see following link)
https://theeventscalendar.com/knowledgebase/url-as-word-button/
I pasted the following snippet into my Theme functions.php (See attached) to change the URL to a Button
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 = “Visit Website »”;
$class = “my-button-class”;
}
return ‘‘ . $label . ‘ ‘;
}
and added the following to my style sheet (see attached):
.my-button-class {
background-color: red;
padding: 10px;
color: #fff;
float: left;
}
According to the instructions, a red button should appear instead of the URL link… However, I am just seeing a linked word. No Button (see attached)…
Can anyone help me get this button to appear properly?
Thanks,
Sean
Medias.no