Opening Times Block
The Opening Times Block is a dedicated component for displaying sets of opening hours. It is designed to pull information from one or more "Opening Times" posts, making it easy to manage and display different schedules (e.g., term time, holidays) in a structured format.
Content Editor Fields
This block works by linking to content created in a separate "Opening Times" section of the WordPress admin.
Block-Level Field
- Opening Times:
- Description: A relationship field where you select which set(s) of opening hours to display.
- Usage: Search for and select one or more "Opening Times" posts that you have already created. The block will display them in the order you select them.
- Requirement: At least one "Opening Times" post must be selected for the block to appear.
"Opening Times" Post Fields
To create the content for this block, you first need to go to the "Opening Times" custom post type in the WordPress admin menu and create a new entry. The fields for each entry are:
Example Usage:
Steps:
-
Create the Content:
- In the WordPress admin, navigate to the "Opening Times" post type.
- Click "Add New".
- Set the WordPress Title to "January - April".
- In the custom fields, set the Heading to "January - April".
- In the Excerpt, type "Blue Planet Aquarium is open everyday (except Christmas Day) from 10am, last entry is always one hour before closing."
- In the Opening Times Details repeater:
- Add a row: Day = "Monday", Time = "10am - 6pm".
- Publish the "Opening Times" post.
-
Add the Block to a Page:
- Edit the page where you want to display the hours.
- Insert the Opening Times Block.
- In the block's "Opening Times" field, search for and select "January - April".
- Save the page.
Result:
The block will render a dedicated section on the page. It will display the heading ("January - April"), the excerpt, and a clean, two-column list showing the days and their corresponding opening hours.
Preview with image:

Editor preview:

Benefits:
- Reusable Content: Create one set of opening hours and use it on multiple pages.
- Easy Updates: To change seasonal hours, you only need to edit the single "Opening Times" post, and it will update everywhere it's used.
- Structured Information: Presents hours in a clear, easy-to-read format for visitors.
- Multiple Schedules: You can select and display several sets of hours in one block (e.g., show both "Term Time" and "Holiday" hours together).
Conclusion:
The Opening Times Block is a powerful and efficient way to manage and display opening hours. By separating the content creation from the page layout, it allows for easy, site-wide updates and ensures a consistent, user-friendly presentation.