Title: ACF Time field
Last modified: March 24, 2021

---

# ACF Time field

 *  [finnfin](https://wordpress.org/support/users/finnfin/)
 * (@finnfin)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/)
 * Back with another issue 🙂
 * I have an ACF Time field which I’m trying to get to display in 12hr format. Field
   is set to use format “g:i A”, but I can’t get shortcode to play ball. It’s always
   displaying time using a 24hr format. Also seems to be the case with Date Time
   field, I can’t format the output with CCS. Using other methods the format is 
   correct, but not with CCS. I’ve checked the site settings and they are set to
   use 12hr clock as well.
 * I’ve tried things like `[field acf_date=time_start format='g:i A']` and `[field
   time_start format='g:i A']` for example. Tried without format. For what it’s 
   worth the example `[today format='Y-m-d H:i']` works fine and I can format it
   the way I want.
 * Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [polarracing](https://wordpress.org/support/users/polarracing/)
 * (@polarracing)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14230968)
 * Try
 * `[field time_start date_format='g:i A']`
    -  This reply was modified 5 years, 1 month ago by [polarracing](https://wordpress.org/support/users/polarracing/).
 *  Thread Starter [finnfin](https://wordpress.org/support/users/finnfin/)
 * (@finnfin)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14230991)
 * Thanks, again! How do you find all these? 🙂
 *  [polarracing](https://wordpress.org/support/users/polarracing/)
 * (@polarracing)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14233475)
 * A lot of experience with this plugin. Using it to sketch complex projects. 🙂
 *  Thread Starter [finnfin](https://wordpress.org/support/users/finnfin/)
 * (@finnfin)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14234921)
 * Nice, yeah tend to pick up things when you tinker 🙂
 * Let’s see if this will stump you:)
 * I would need to sort an ACF Related list by an ACF field in the related posts,
   preferably by two things. First by weekday, then by time.
 * [related event orderby=?? order=ASC count=8]
    [taxonomy weekday] [field time][/
   related]
 * This might not even be possible from what I understand?
 *  [polarracing](https://wordpress.org/support/users/polarracing/)
 * (@polarracing)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14235904)
 * Not sure about related fields – I use taxonomies for relations.
 * I would store the relation as id, then read out the field and get an id-list.
   This can then be used to limit a loop – and a loop can be sorted.
    -  This reply was modified 5 years, 1 month ago by [polarracing](https://wordpress.org/support/users/polarracing/).
 *  Thread Starter [finnfin](https://wordpress.org/support/users/finnfin/)
 * (@finnfin)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14255262)
 * Thanks for that. Not sure I understood yet, but I’ll try and wrap my head around
   what you suggested 🙂
 *  [polarracing](https://wordpress.org/support/users/polarracing/)
 * (@polarracing)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14260814)
 *     ```
       [related event]
       [if var=my_list]
       [set my_list][get my_list],[field id][/set]
       [else]
       [set my_list][field id][/set]
       [/if]
       [/related]
       [pass vars]
       [loop type=my_content id={MY_LIST} orderby=name order=ASC]
       Do what you need
       [/loop]
       [/pass]
       ```
   
    -  This reply was modified 5 years, 1 month ago by [polarracing](https://wordpress.org/support/users/polarracing/).
 *  Thread Starter [finnfin](https://wordpress.org/support/users/finnfin/)
 * (@finnfin)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14265957)
 * Great! That works perfect.
 * I’m passing another field to use as a filter with an `[if]` statement, and it
   seems using `[count=5]` limits how many time the loops runs through. Is there
   a way to limit the actual output count after filtering, not the loop count?
 * Also, would this same sorting method work for repeater rows?
    -  This reply was modified 5 years, 1 month ago by [finnfin](https://wordpress.org/support/users/finnfin/).
 *  Thread Starter [finnfin](https://wordpress.org/support/users/finnfin/)
 * (@finnfin)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14293499)
 * Any ideas on this? I can’t figure out how to loop through repeater rows and then
   sort them.
 * Another issue that I have is that inside the said repeater is a taxonomy field,
   which is actually taxonomy of another post type. Is there any way I can call 
   that field with shortcode and have it output the taxonomy name, not ID? It works
   fine if I set the field to return ID, but if I use Term Object, it breaks it 
   completely and i get error “ERROR: WP_Term could not be converted to string”.
   Is there a way to use say format method to output the actual taxonomy name?

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘ACF Time field’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [finnfin](https://wordpress.org/support/users/finnfin/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/acf-time-field/#post-14293499)
 * Status: not resolved