I'd be happy to assist you with more specific steps, but I'll need to understand first, what led to the crash.
After exactly which action did the website crashed and did you see any error or warning when it happened?
Thinking it through, is there any specific reason you're using a repeatable field group for storing opening and closing hours for the days of the week?
The challenge with a repeatable field group is that it can only be used with one post type. But you need to store the opening and closing hours for more than one post type. Moreover, the repeatable field groups are beneficial for the cases where the number of data entries is infinite or variable. But, in this case, the days of the weeks will always remain 7.
(you'll need to store 7 records of opening and closing hours for each post)
Based on this, I'll recommend adding a new field group and name it something like "Operating Hours" and set it to show for all the post types where you need to store the opening and closing hours.
Next, in this field group, you can add these 14 single line type custom fields:
- Opening Hour Monday
- Closing Hour Monday
- Opening Hour Tuesday
- Closing Hour Tuesday
- Opening Hour Wednesday
- Closing Hour Wednesday
- Opening Hour Thursday
- Closing Hour Thursday
- Opening Hour Friday
- Closing Hour Friday
- Opening Hour Saturday
- Closing Hour Saturday
- Opening Hour Sunday
- Closing Hour Sunday
This approach will be efficient because:
a). to add the opening and closing hours with each post, you won't need to create entries inside the repeatable field group
b). you won't need the custom code from Minesh to automatically create the repeatable field group entries
c). you won't have to create separate Hours custom field groups with separate repeatable field groups with separate opening and closing hours fields, for each post type.
d). to show the custom field values from the repeatable field group, you need to use a post view. But to show the custom fields added directly to the post type (i.e. without the repeatable field group), you can show them directly like regular custom fields, without a post view.
I hope this helps and please let me know if you have any questions.