Forum Replies Created
-
AuthorPosts
-
Mylene Bruneau
ParticipantI don’t know how to get the $eventID value so that code gives me a fatal error…
But thank! I think I’m done with my customization.Mylene Bruneau
ParticipantThanks, I will try that, but I have found a workaround where I changed the text to “The is available on demand” as a warning message.
BUT I have another question:
I added a custom field for the workshop number (example: 907)
– I would like to show that number in the LIST page (https://cenopformation.com/formations/) next to the title. I found the file and location where to put my script, but I tried calling that value, to no avail. get_post_meta($post_id, ‘No Formation’, true); which is the WP call, but is it because I should use tribe_events call?
– I managed to have that custom field column appear in admin, and to make it sortable. BUT when I click to sort it, the order is… whatever. 100 then 1003 then 700 then 307… Any idea why ?Also to those interested about events with no dates:
1) I created a category for events “on demand”
2) Assigned it to events, then put a date in the past
3) Created an archive page for that category
4) Masked the date in the list php page on condition (if category = on-demand then don’t show date)
5) Also hid the date in the single page, on condition
That way, I can have the same design / functionalities / category browsing for events with no dates.
I did put a link in the event description to a simple form to request that workshop via email.Just be careful to put the date enough in the past that it won’t show up on the monthly view calendar
Mylene Bruneau
ParticipantOK so I put this in details.php
<?php if (tribe_event_in_category(‘formation-sur-demande’)) { // show nothing ?>
<?php } else { // show date and time ?>
<?php } ?>
It worked.
Only thing left: The single page of an event still show a notice on top:
The event has passed.Applying this same logic, I could hide this notice when category is “formation-sur-demande”, but I cannot find in which file this is generated…
I’m close, any hint appreciated! -
AuthorPosts
