Home › Forums › General Issues › How to var dump › Reply To: How to var dump
It should be printed at the very top of your outward-facing theme, like on the home page. There is a chance that your theme’s CSS could hide or distort the output, so you might have to view your page source to see it.
I like to put a string in front that I know is unique so that I can Ctrl+F and search for the text, like so:
echo '<pre>testdump999: '.print_r($field, true).'</pre>';
There’s a pretty slim chance that “testdump999” will show up anywhere else on its own, so if I can find that then it’s the output I’m looking for.
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.