Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question

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' );

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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