Support » Plugin: The Events Calendar » Remove html in website url

  • Resolved xxaimsxx

    (@xxaimsxx)


    How do I override this function to take out the “http://”

    function tribe_get_organizer_website_link( $post_id = null, $label = null ) {
    		$post_id = tribe_get_organizer_id( $post_id );
    		$url     = tribe_get_event_meta( $post_id, '_OrganizerWebsite', true );
    		if ( ! empty( $url ) ) {
    			$label = is_null( $label ) ? $url : $label;
    			if ( ! empty( $url ) ) {
    				$parseUrl = parse_url( $url );
    				if ( empty( $parseUrl['scheme'] ) ) {
    					$url = "http://$url";
    				}
    			}
    			$html = sprintf(
    				'<a href="%s" target="%s">%s</a>',
    				esc_attr( esc_url( $url ) ),
    				apply_filters( 'tribe_get_organizer_website_link_target', '_self' ),
    				apply_filters( 'tribe_get_organizer_website_link_label', esc_html( $label ) )
    			);
    		} else {
    			$html = '';
    		}
    
    		return apply_filters( 'tribe_get_organizer_website_link', $html );
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @xxaimsxx,

    Thanks for posting, & Iā€™m happy to help.:)

    Unfortunately, this kind of request would require some customization that we can’t provide on these forums. However, we do have some resources for guidance doing that here. If you need to find someone to help with the customizations, we also have some tips for finding help here.

    Hope this helps, and thanks for understanding!

    Best,

    Shelby šŸ™‚

    Plugin Author Victor Zarranz

    (@vicskf)

    Hey there! This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up and we’d be happy to help. šŸ™‚

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove html in website url’ is closed to new replies.