문제

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?

도움이 되었습니까?

해결책

add_filter( 'show_admin_bar', '__return_true');

Add this at the end of functions.php

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top