Home › Forums › Calendar Products › Events Calendar PRO › Three questions about getting info out to use in short codes
- This topic has 8 replies, 5 voices, and was last updated 9 years, 2 months ago by
David.
-
AuthorPosts
-
December 27, 2016 at 5:58 am #1210727
David
ParticipantWhat function can I use to get the event category please?
What function can I use to get the total number of tickets for an event please? Not those available – the total, including those sold!
How can I get a list of countries that events are held in – and a click on one of these takes me to a listing page for that country only?December 28, 2016 at 11:57 am #1211185Hunter
ModeratorWelcome back, David!
What function can I use to get the event category please?
Please review our Using tribe_get_events Knowledgebase article and let me know if it helps get you started in the right direction.
What function can I use to get the total number of tickets for an event please? Not those available – the total, including those sold!
I recommend checking out our Functions section for this type of information. Let me know if you have any troubles tracking down the info you need and I’ll do my best to assist.
How can I get a list of countries that events are held in – and a click on one of these takes me to a listing page for that country only?
The Using tribe_get_events Knowledgebase article is where you’ll need to refer to for this type of customization.
Please note we’re limited on providing custom code, but I’d be more than happy to help point you in the right direction. If things get beyond your level of expertise, please review our list of customizers for further assistance.
I’ll also provide any documentation I have relating to shortcodes below:
- PRO Widget Shortcodes
- Embedding Calendar Views with the [tribe_events] Shortcode
- Inserting Calendar Content into Posts or Pages
Thanks and have a wonderful rest of your day. Cheers!
December 28, 2016 at 1:21 pm #1211208David
ParticipantI’ve already used the knowledgebase for the first query – the link you provided is of no help at all – a peruse through the source files showed me the function I needed, but I doubt that I have found the most efficient way for getting the data out
The second query – I have already checked https://theeventscalendar.com/?s=ticket&submit=Search&post_type%5B%5D=wp-parser-function&post_type%5B%5D=wp-parser-hook – hence me knowing that there are functions – apparently listed – to return the number of tickets remaining – but no function for tickets sold or tickets in total – can you show me the function that you believe does achieve this aim?
There is no aspect in the linked page of https://theeventscalendar.com/knowledgebase/using-tribe_get_events/ – that shows anything to do with venues – can you show me the area of that page that you believe does achieve this aim?
Every question I have posted thus far is met with, we don’t support that, but can point you to paid people who can help you – pretty poor support in my opinion – and lo and behold, in some cases, I dig around and find that what I want to obtain, can be reached, but you prefer to say that it can’t
December 28, 2016 at 1:31 pm #1211212David
ParticipantI’m not asking you to provide code – or a custom solution – just a simple ‘where is the function to provide x information’ – I can happily code it myself, I have done so for a host of other short codes already – that is why your answers are so infuriating. Your own page about customisers states ‘If you’ve read our forum guidelines, you’ll know there are some customizations that are just outside the scope of what we can help with’ – but I don’t want you to customise, I am happy to do that, seemingly simple questions are too tough to answer like ‘How do I get the total number of tickets ever on sale for an event’, tell me and I can take it from there!
January 11, 2017 at 2:53 pm #1216962George
ParticipantHey David,
I’m sorry to hear about your frustrations with moving forward on your customizations and hope to help resolve this thread.
I can totally sympathize with where you’re coming from—asking for specific functions and class methods may not “feel” like asking for customization support.
But it often can be. Let’s take your last sentence in the above reply for example:
I don’t want you to customise, I am happy to do that, seemingly simple questions are too tough to answer like ‘How do I get the total number of tickets ever on sale for an event’, tell me and I can take it from there!
☝️ How would we be able to answer this question—”How do I get the total number of tickets ever on sale for an event”—without providing the actual custom code necessary to achieve this?
When you ask, “How do I get the total number of tickets ever on sale for an event”, if you are not asking us for the specific code necessary to do this, what information are you asking us to provide in relation to this question?
To be clear, my intent here is to help us clarify this conversation and help it move forward—if we are misunderstanding your requests, hopefully my questions here will help us better understand your requests and provide the type of support you would like.
Sincerely,
GeorgeJanuary 11, 2017 at 3:05 pm #1216975David
ParticipantHey George – how about you search these forums – eventually I found the answer, someone asked it before – and one of your guys answered it before – and shockingly, he was a lot more helpful than you have been on any of my requests, no he didn’t write code, he suggested a way of doing it, posted some functions that might be helpful – and there was enough information there for the original poster to work out a solution – and even though I didn’t need the same thing – I could work out the solution I needed too – and wow, colour me sarcastic here, but the previous support ticket was helpful – instead of saying, ‘Here is a link to a customisation service’!
When two of the three questions have now been answered – and most of the information was either a) a blatant attempt to get me to go to a consulting service or b) completely wrong in most of the pages that you pointed me to – I would say that you personally were of little use on this thread – and two weeks between replies, pretty poor as well
I refer you to the outstanding question – and the useless link you posted – and I ask again, can you show me the area of that page that you referred me to that you believe does achieve this aim?
There is no aspect in the linked page of https://theeventscalendar.com/knowledgebase/using-tribe_get_events/ – that shows anything to do with venues
January 13, 2017 at 1:27 am #1217925George
ParticipantHi David,
As noted my reply was intended to help clarify the desired outcome of this thread if it’s not custom coding. You describe being able to code yourself, and just wanting function names, so the first thing I can recommend is to just dive into the code yourself. Simply open our plugins that you want to extend in a code editor, and start reading the code — much of it is well-commented and there’s no better technical documentation than the code itself.
In response to your original three questions, you mention just wanting some simple function names. So here goes:
• Here is some information on accessing categories for events: https://theeventscalendar.com/support/forums/topic/displaying-the-category-name-2/#post-1217046
• When it comes to getting the total number of tickets, this is more tricky, but here is a set of example code showing how to get ticket counts → https://gist.github.com/ggwicz/1926214a50e286182fd13950bc23e17f
• When it comes to getting a list of countries, this is where Hunter’s recommended use of tribe_get_events() comes in. Please cite the guides he shared for this — use tribe_get_events() to get a set of events whose countries you want. Once you’ve got the set of events, access their attached venues (use functions like tribe_get_venue_id() to get Venue IDs). Once you’ve got the venues, use WordPress functions like get_post_meta() to access their various meta information like the Country to which their address belong. This will let you get countries and so you can then do what you’d like with the countries from there on.
In regards to your comments, the one thing I genuinely cannot explain and am deeply sorry for is the length of time it took for a response on this thread. That is a serious problem and is objectively very rare one—if you trawl through our forums, for example, you’ll see that an overwhelming majority of conversations happen on our promised 24–48 hour time scale. I apologize for the lapse in that pace of conversation here.
— George
February 4, 2017 at 8:35 am #1229418Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Three questions about getting info out to use in short codes’ is closed to new replies.
