Question

I'm working on a WP site which has a custom theme built from scratch and I can't seem to figure out how to get the Admin Bar to appear when viewing the public site.

The themes footer.php file has the wp footer code in it: <?php wp_footer(); ?> just before the closing </body> tag. I've tried disabling all plugins and reverting back to default theme. The Admin bar appears when using the Twenty Twenty One theme so the issue is with this custom built theme for sure. Disabling plugins had no effect.

The theme is using ACF.

I have enabled admin bar from my WordPress profile settings.

WP_DEBUG doesn't throw any errors or notices.

How could I troubleshoot this further?

Was it helpful?

Solution

add_filter( 'show_admin_bar', '__return_true');

Add this at the end of functions.php

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top