Home › Forums › General Issues › opening time for store, an idea? › Reply To: opening time for store, an idea?
pecnet,
The way I’ve done it before is as follows. It seems a little long-winded at first, but tends to produce the best (consistent) results.
Create a repeater field: opening_hours
. You make it so each ‘row’ has:
Then I make my own WordPress shortcode that loops through the repeater field to output the information in the format I want (HTML, relevant classes…etc.). This negates your requirement for loads of specifically named data (eg. hour_sunday
).
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.