Home › Forums › General Issues › Save total CPT count to ACF field › Reply To: Save total CPT count to ACF field
In order to save the total number of posts each time one is created, I think you might need to hook into either acf/save_post or WordPress save_post, where you would update the total count.
Depending on your requirements, it may be easier to just use wp_count_posts when you need to display that number.
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.