I hope you're well. I'm reaching out regarding the STEC Calendar plugin and need some assistance with customizing the Event Layout Builder template.
Specifically, I'd like to modify the address display format to follow the standardized US format, presented in a linear fashion. Currently, the layout uses a format, which isn't ideal for my audience and doesn't allow for the specific placement of the address element, like this shortcode allows for:
misc__address_order - Address order
Values: Comma-separated values “country,state,city,address,postal_code
I would like the address in the event builder template to appear as follows:
[Street Address], [City], [State] [Zip Code]
This linear format aligns with US conventions and would be much more intuitive for my users. I'm providing a screenshot that demonstrates the desired outcome to better illustrate my request.
I appreciate any guidance or support you can provide in making this change.
I have applied the html/js solution to my Basic Event Layout template and also see that you put it in the HeyGR template. However, it appears that the modified address is not being displayed at all on any of our single event pages.
Example This event is using the Basic Event Layout. The reformatted address is not rendering.
I hope you're well. I'm reaching out regarding the STEC Calendar plugin and need some assistance with customizing the Event Layout Builder template.
Specifically, I'd like to modify the address display format to follow the standardized US format, presented in a linear fashion. Currently, the layout uses a format, which isn't ideal for my audience and doesn't allow for the specific placement of the address element, like this shortcode allows for:
I would like the address in the event builder template to appear as follows:
[Street Address], [City], [State] [Zip Code]
This linear format aligns with US conventions and would be much more intuitive for my users. I'm providing a screenshot that demonstrates the desired outcome to better illustrate my request.
I appreciate any guidance or support you can provide in making this change.
Thank you in advance!
Attached files: Screenshot - 2024-10-04T222319.000.png
Hi,
1) Enforce the misc__address_order parameter for both the calenar and the single event page via these two PHP hooks.
You will have to insert this hook in your child-theme functions.php file since I don't have access to do it myself.
---
2) If you want to convert the Address Element to a one line text you can do so with js like I did in your template (HeyGR Event Layout) here:
The JS code there is:
If course you can modify it. This is just an example.
Stachethemes Developer
Hello, thank you for your reply!
I have applied the html/js solution to my Basic Event Layout template and also see that you put it in the HeyGR template. However, it appears that the modified address is not being displayed at all on any of our single event pages.
Example This event is using the Basic Event Layout. The reformatted address is not rendering.
https://heymichigan.com/event/tuesday-trivia-in-grand-rapids-mammoth-distilling/2024-10-08T19:00/
Please advise. Thank you.
Attached files: Screenshot - 2024-10-08T142650.672.png
Screenshot - 2024-10-08T142949.742.png
You forgot to place the custom class to the address element ( custom-address ).
The js expects the element to have this class name otherwise nothing will happen.
Stachethemes Developer