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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.