Home › Forums › General Issues › Meta title and description via ACF › Reply To: Meta title and description via ACF
On an archive page get_field(), get_the_excerpt() and get_the_title() will all fail to return any value. These all depends on the global post and on archive pages there isn’t one.
In order to do this you need to have a value stored somewhere, like on an options page or something. Then you need to detect that you are showing an archive page and then get the values you want to set from wherever they are stored.
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.