Home › Forums › Calendar Products › Events Calendar PRO › Custom fields that can support HTML?
- This topic has 15 replies, 5 voices, and was last updated 11 years, 8 months ago by Casey.
-
AuthorPosts
-
July 9, 2012 at 8:49 am #21736JohnMember
I am needing to create some custom fields that can support html. I’m simply tryitng to create a “register here” link that will populate within the main event details (the details generated by pro calendar).
July 9, 2012 at 11:25 am #21759JonahParticipantHi John,
The only custom fields available via our plugin are the ones you see. You can wrap custom field output in whatever HTML you want though and this should do what you need. Here is an example: https://gist.github.com/2901504
I hope that helps!
– Jonah
July 9, 2012 at 12:11 pm #21774JohnMemberIm not sure how this helps. Here is a screen cast of my issue. http://screencast.com/t/RRFlUuTf
I’m simply trying to create my own static link within “event, date, cost, category, ect..” I just need a link that says “register here” and it links out to my registration portal.
Also, is there a way to include the mini calendar in this area? please see screen cast.
jon
July 9, 2012 at 12:14 pm #21778JonahParticipantHi John,
You would add the above code to a copy of /wp-content/plugins/the-events-calendar/views/single.php placed in an ‘events’ folder in your theme and echo out your specific custom field by replacing “Label For Custom Field Link” with the label of the custom field(s) you want to output and wrapping that custom field output in whatever HTML you need. Look at the comment here for an example of the code wrapped in HTML: https://gist.github.com/2901504
July 9, 2012 at 1:24 pm #21801JohnMembercan you please show me what this looks like in the single.php document? Don;t know where to start and I need to have this basic functionality. thanks for your help
jon
July 10, 2012 at 10:16 am #21869JohnMemberJonah, any ideas on how to do this? Just need some guidance.
July 10, 2012 at 1:53 pm #21896JonahParticipantHi John, sure. Take a look at my comment here: https://gist.github.com/2901504
You would find this around lines 87-91 in single.php – I hope that helps!
– Jonah
August 3, 2012 at 1:13 pm #23193louisParticipantHi Jonah,
Thanks for the info here. I’ve followed your instructions whole I’m close to getting the results I’m after, I’m still falling a little short. Can you help me a couple of minor things?First off, can you show/tell me where in your code to place the HTML tag so my link will be activated via a button rather than a standard web address link? (Here’s the code I’m using: Register Now)
Secondly, as a test, I dropped in your code, changed the field name to match the one I created, and added a link, however, when I click the link, it just takes me back to my event listing and not to the page that’s linked. Any thoughts on why this is happening?
Thanks for your help!
August 3, 2012 at 1:34 pm #23199RobMemberHey Louis. Thanks for the follow-up here. Just a heads up that Jonah is actually on sabbatical currently and will be for about the next month, but I’m happy to field this to another dev so we can get you a response. Just to set expectations, though — since it’s getting late on Friday I probably will not be able to get them to take a look until sometime Monday. That being said this is on the top of the queue for that day so you should have a response quickly into the new week.
Thanks for your patience so far and please let me know if I can do anything else in the interim. Cheers!
August 3, 2012 at 1:39 pm #23200louisParticipantThanks, Rob. I have a few more questions that are Event Calendar related but not specific to this topic. Should I ask you here or just post in the general forum?
August 3, 2012 at 1:40 pm #23202RobMemberIf you would be willing to post them into new threads (ideally a separate thread for each distinct issue, so we don’t create confusion addressing multiple issues in the same thread) it’d be fantastic…and we could respond directly from there. Cheers!
August 6, 2012 at 12:24 pm #23304CaseyParticipantLouis,
Regarding your first question, you should be able to do something like this instead of using an anchor tag: https://gist.github.com/3277768Regarding your second question, make sure you’ve first created the custom field for your event. You’ll want to make sure this custom field name is consistent across events: http://www.diigo.com/item/image/1s965/te6j?size=o
After you’ve done that, then you’ll want to modify the code to use your custom field name instead of ‘Label For Custom Field Link’.
Hope that helps! Let me know if you have any other questions.
August 9, 2012 at 7:22 am #23476louisParticipantThanks, Casey! I’ll try those out and keep you posted!
August 9, 2012 at 1:46 pm #23494louisParticipantCasey, thanks for the help and I got the above up and running which led me to a new question…
I have two Custom Field options (Webinar or Lunch) that I want to send users to a custom registration page (one for each option) when the “Register Now” button is clicked. These options will be set up in my Custom Field with a radio button so only one of them can be selected at a time. Can you help me with setting up the code for this? I tried copying the code and replacing the custom field name but that just gave me two buttons next to each other.August 15, 2012 at 8:09 am #23699RobMemberHey there Louis. Thanks for the follow-up; glad to hear Casey’s first tip got you where you needed to be on that end.
I’m not sure the level of effort required for your second request; it may be outside the realm of what we can provide support on if it’s complex customization, but if Casey has any tips that can point you in the right direction I’ll definitely have him pass those on. I’ve asked him to take another look accordingly.
Stay tuned and thanks for your patience so far.
-
AuthorPosts
- The topic ‘Custom fields that can support HTML?’ is closed to new replies.