Replace Website Link Displays with Unique Text for Event, Venue & Organizer

Home Forums Calendar Products Events Calendar PRO Replace Website Link Displays with Unique Text for Event, Venue & Organizer

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #105025
    gainesvilletennis
    Participant

    Hi there,
    I found this thread which has a code snippet for modifying all three event single page website link labels (venue, organizer and event links).

    Remove http:// from event weblink


    How can I modify that snipped of code so that it allows me to put the respective word in the linked text. For example, instead of all three saying “Visit Website”, I’d like each one to be specific to the link type, for example, “Event Website” and “Organizer Website” and “Venue Website”

    #105029
    gainesvilletennis
    Participant

    Also I implemented that solution and now receive the following error message on my event page:
    Warning: strpos() [function.strpos]: Offset not contained in string in /homepages/19/d415319984/htdocs/gacta/gainesvilletennis/wp-content/themes/parlament/functions.php on line 499

    #105597
    Brook
    Participant

    Howdy gainesvilletennis,

    I think this snippet will work a bit better for you. Did it? Please let me know. Cheers!

    – Brook

    #105599
    Barry
    Member

    You’re right, it will generate a notice (if the code isn’t provided with a well formed link, for instance) – I’ve updated the snippet to avoid that, but please note it was just a simple example to provide a starting point for anyone wishing to make a customization along these lines.

    What’s basically happening is the same function – modify_event_link() – is called whether the URL relates to the event, the organizer or the venue – hence why it supplies the same text in each case – and you can see how that is hooked up in the final 3 lines of the snippet. In your case, you could simply create two more functions to handle each special case (one for venues, one for organizers … as in Brook’s example).

    Does that help?

    #116318
    gainesvilletennis
    Participant

    Thanks, this worked perfectly!

    #118499
    Leah
    Member

    Hi gainesvilletennis,

    Glad to hear you got things working! If you have a minute or two, we will love it if you could leave us a review here. Thank you for your support!

    Best,

    Leah

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Replace Website Link Displays with Unique Text for Event, Venue & Organizer’ is closed to new replies.