Home › Forums › General Issues › Write an ACF Image to the WP Site Logo and Site Icon › Reply To: Write an ACF Image to the WP Site Logo and Site Icon
These options store ID values, you just need to get the ID value from the ACF field, this can be done by not getting the formatted value using false for the 3rd argument of get_field()
update_option('custom_logo',get_field('platform_logo','options', false), true); // Update Site Logo
update_option('site_icon',get_field('platform_favicon','options', false), true); // Update Site Favicon / Icon
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.