Let's say that I have a URL path that is not handled by wordpress,like /custom/ but I want to add the admin bar to these pages.

What should I add to these pages in order to make the admin bar available in them.

1 Answer 1


Try the following code:

<script type="text/javascript" src="wp-includes/js/admin-bar.js"></script>
<link rel="stylesheet" type="text/css" href="wp-includes/css/admin-bar.css">
require_once( dirname(__FILE__) . '/wp-load.php' );


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.