Answers.Body: <p>The current way to achieve this would be with SearchKit. It can allow you to <a href="https://docs.civicrm.org/user/en/latest/searching/searchkit/example-upcoming-events/" rel="nofollow noreferrer">customize your own Upcoming Events screen</a>.</p>
  <p>Once you've created the search and embedded it in FormBuilder, you are ready to place it on your WordPress page via the provided ShortCode.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-15T20:23:43.017Z
Answers.Text: Thank you, this was incredibly helpful. I now have SearchKit > Form Builder > shortcode > listing in the public web page! However, the time-of-event includes seconds (`HH:mm:ss`) and, worse, the event PRICE is not offered as a field anywhere, nor is the status (open/available -vs- closed/full). Do these fields not exist?
Answers.UserDisplayName: Torben Gundtofte-Bruun
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-15T20:36:19.930Z
Answers.Text: re Dates - try Try: Administer > Localisation > Date Formats
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-16T13:21:21.607Z
Answers.Text: You're welcome. You should be able to get the participant count by joining onto the Participant entity, enabling GROUP BY event id, and selecting participant ID with the COUNT field transformation. In your "with Participants" clause you should also filter out pending/cancelled registration status.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-16T13:37:16.330Z
Answers.Text: I think getting the price from SearchKit is still an open issue, due to the potentially complex price structure of events. The short answer to "does that field exist" is "no" because any event can have multiple price sets and multiple price fields, discounts, etc.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-16T13:38:34.143Z
Answers.Text: CiviCRM is maintained by a small but dedicated group of people. We are always looking for ways to improve the project. If you are interested in sponsoring this feature to expose Event prices to SearchKit, we'd be happy to work with you!
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-17T20:18:18.277Z
Answers.Text: I followed @Coleman's idea and that went well -- but I discovered that the table which is embedded using shortcode into the public webpage is only shown to logged-in users. Visitors do not see the table, as if it does not exist. The subsequent page content moves up, so there's not even a blank area where it should be. **How can I make this table publicly visible?**
Answers.UserDisplayName: Torben Gundtofte-Bruun
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-18T20:40:54.120Z
Answers.Text: The question in my previous comment is [answered here](https://civicrm.stackexchange.com/q/45720/15929)
Answers.UserDisplayName: Torben Gundtofte-Bruun
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-15T14:12:18.160Z
Answers.LastActivityDate: 2023-10-15T14:12:18.160Z
Answers.UserDisplayName: Coleman
Body: <p>I help a swim club that offers swimming lessons to small children. They use CiviEvents to publish their courses, and the challenge is this: <strong>How can I get a nice list of these courses shown in a WordPress page?</strong></p>
  <p>Ideally, I want a table with columns like these:<br />
  <code>Course name | Start date | Time of day | Weekday | Price | Link to sign up</code></p>
  <p>Ideally, the 'link to sign up' turns into 'closed' or something when the signup period has passed.</p>
  <p>My test setup is newest WP 6.3.2 and newest CiviCRM 5.66.0.</p>
  <p><a href="https://docs.civicrm.org/user/en/latest/events/integrating-events-with-your-website/" rel="nofollow noreferrer">This official documentation</a> is not helpful at all. I am not sure it is current.<br />
  <a href="https://civicrm.stackexchange.com/questions/4008/listing-events-in-wordpress">This 8-year-old question</a> comes closest but does not help me.</p>
  <p><em>Edit: I have just found the <a href="https://aghstrategies.com/civievent-widget/" rel="nofollow noreferrer">CiviEvent widget</a> but I am struggling to make it show a nice listing with enough details.</em></p>
  
Tags: <wordpress><civievent>
Title: How to show courses (events) as a table listing in WordPress?
ThreadText: # How to show courses (events) as a table listing in WordPress?
  
  (Asked by: username_0 on 2023-10-15)
  
  I help a swim club that offers swimming lessons to small children. They use CiviEvents to publish their courses, and the challenge is this: **How can I get a nice list of these courses shown in a WordPress page?**
  
  Ideally, I want a table with columns like these:  
  `Course name | Start date | Time of day | Weekday | Price | Link to sign up`
  
  Ideally, the 'link to sign up' turns into 'closed' or something when the signup period has passed.
  
  My test setup is newest WP 6.3.2 and newest CiviCRM 5.66.0.
  
  [This official documentation](https://docs.civicrm.org/user/en/latest/events/integrating-events-with-your-website/) is not helpful at all. I am not sure it is current.  
  [This 8-year-old question](https://civicrm.stackexchange.com/questions/4008/listing-events-in-wordpress) comes closest but does not help me.
  
  *Edit: I have just found the [CiviEvent widget](https://aghstrategies.com/civievent-widget/) but I am struggling to make it show a nice listing with enough details.*
  
  **Tags:** wordpress, civievent
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-10-15. Score: 2 | Accepted answer
  
  The current way to achieve this would be with SearchKit. It can allow you to [customize your own Upcoming Events screen](https://docs.civicrm.org/user/en/latest/searching/searchkit/example-upcoming-events/).
  
  Once you've created the search and embedded it in FormBuilder, you are ready to place it on your WordPress page via the provided ShortCode.
  
  > **Comments:**
  > **username_0**: Thank you, this was incredibly helpful. I now have SearchKit > Form Builder > shortcode > listing in the public web page! However, the time-of-event includes seconds (`HH:mm:ss`) and, worse, the event PRICE is not offered as a field anywhere, nor is the status (open/available -vs- closed/full). Do these fields not exist?  
  > **username_2**: re Dates - try Try: Administer > Localisation > Date Formats  
  > **username_1**: You're welcome. You should be able to get the participant count by joining onto the Participant entity, enabling GROUP BY event id, and selecting participant ID with the COUNT field transformation. In your "with Participants" clause you should also filter out pending/cancelled registration status.  
  > **username_1**: I think getting the price from SearchKit is still an open issue, due to the potentially complex price structure of events. The short answer to "does that field exist" is "no" because any event can have multiple price sets and multiple price fields, discounts, etc.  
  > **username_1**: CiviCRM is maintained by a small but dedicated group of people. We are always looking for ways to improve the project. If you are interested in sponsoring this feature to expose Event prices to SearchKit, we'd be happy to work with you!  
  > **username_0**: I followed @username_1's idea and that went well -- but I discovered that the table which is embedded using shortcode into the public webpage is only shown to logged-in users. Visitors do not see the table, as if it does not exist. The subsequent page content moves up, so there's not even a blank area where it should be. **How can I make this table publicly visible?**  
  > **username_0**: The question in my previous comment is [answered here](https://civicrm.stackexchange.com/q/45720/15929)  
  
  ---
  
  