Posted: October 17, 2014 at 5:47 am
|
On this page, http://supersportsevents.me/, using calendar table plugin, I want to be able to link from the “Venue Name” to the venue page. I’ve fiddled with the PHP in the plugin and this is the code I’ve cobbled together after some trial & error: redacted – Event Espresso support team – LOC So, any advice how to tweak the code so that only the venue name becomes a hyperlink, and links to the venue id url? Thank you |
Hi Angus, the support forums did not render the code correctly and its difficult to follow in its current state. Could you send a copy of the file to the email below: support [at] eventespresso.com Be sure to include this support URL in your email so we know what the file is for: https://eventespresso.com/topic/hyperlink-from-text/ Thanks — |
|
|
Hi Lorenzo I’ve put it in pastebin http://pastebin.com/aEr7B9bA name is SSEME2 – 181014 Thanks |
Hi, I think I found the issue. Could you close the link? See this: http://cl.ly/image/2j2L1c1b112X — |
|
|
Thanks Lorenzo that’s solved the “extension of the link” issue, but it’s still linking to the home page supersportsevents.me not the event url. Neither $url_venue_id, nor $venue_id_url nor link $venue_url or $url_venue link to the venue id page. So, the question is, how do I determine the event url? ” ” target=”_blank”><?php echo stripslashes_deep($event->venue_name); ?><br /> Thank you |
|
Here’s the whole snippet – looks like it was truncated above. ” ” target=”_blank”><?php echo stripslashes_deep($event->venue_name); ?><br /> |
|
That didn’t work either – here’s the relevant part! Is some form of identifying the URL required, such as mention in a foreach loop? Sorry, no PHP knowledge at all, purely looking for patterns in similar examples! Thanks |
|
Right, let’s see if this works!
|
Hi Angues, The forum strips out a lot of code for security. When posting examples your are best using pastebin like above π Can you tell me where (within Event Espresso) are you adding the venue url? |
|
|
Hi Tony – that was frustrating – I know for next time!! I’m trying to adapt the Event Espresso Template – Calendar Table plugin aka espresso-template-calendar-table/index.php – which creates the calendar that is our home page – supersportsevents.me. Venue manager is alive and kicking. We’re trying to get the venue name to link to the venue page, because currently there appears to be no way of getting to it! Which is irritating considering how much effort went into creating them. Google maps are useless in this part of the world since there is no proper consistent system of addresses. I’ve added the entire plugin as it is running now with functioning edits here SSEME3 – 201014 http://pastebin.com/5J93EAAX Thanks |
In EE3 venue pages are not automatically created for your venues, can you link me to one of the venue pages? Is it a normal post with [ESPRESSO_VENUE id=”x”] in the content? |
|
|
Yup, standard shortcode. We did have links to venues setup from our home page, but then i upgraded EE3 and we lost the changes. Developer made them when he set it up, but hasn’t sent us back the css he made or offered us access to the server so can not access the backup that is stored there. First backup only went there, after that I managed to get it to work with DropBox so I have backups now, that I can access. The venue link is quite important since the description includes the embed code from g-maps for the precise locations of our events – outdoor sporting ones. I’ve just looked and our whole event thing is out the window and back to the std setup. I can only access where I have created static pages. We removed the info form the registration form since it was in the way. The intention being that people could link to it from the venue name; that still is the intention if we can work out how! Thanks |
|
Hi, If the post/page where the venue details are has a title that just includes the venue name exactly then you could do something like this: See this pastebin http://pastebin.com/9bcjCEqG All that does is make a slug out of the venue name (which is why the page/post with the venue details on must have a title the same as the venue name) and then makes it into a link. Please note that updates WILL over write any changes made to the template.
|
|
OK, so if I create static pages for each venue, with exactly the same name as the venue name, then that code (once I’ve added in my specific parameters) will create a link from the venue name to the static page? Presumably I paste this code in the location within the plugin where I want the link to occur? Just checking π Thanks |
|
Hi, Yes to all the above. It was the simplest way I could see to create the link and keep it somewhat automated. There might be other ways though. |
|
I’m hoping that you guys have the jobs you do because you do know the simplest way π Let’s see how I get on adapting the code! Let’s mark this one pending, for now! Thanks |
|
Works a treat, just need to add the target_blank code in now. Thank you. Now resolved π |
The support post ‘hyperlink from text’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.