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

I have been trying to get the admin bar to show up under a magento install. I have tried eveything to get it. I can get the user, get the footer but nothing happens to get the admin bar up.

from with in a 1column.phtml I called a

        echo $this->getLayout()->createBlock('core/template')->setTemplate('custom/userpanel.phtml')->toHtml(); 

and in that 'custom/userpanel.phtml' I added :



with out anyluck.

I'v tried using


but that doesn't get the bar, and even calling the head function doesn't work


But althou i get all the head elements like the and what not which i don't want since it's in the , but still nothing. What is the way to set it up correctly?




So I thought I'd get tricky and just grab the admin bar from WP and pull it over almost like jquery .load() but at php runtime. This is what i did, but here is the odd part, it fails cause it thinks I'm not loged in?

Again in 'custom/userpanel.phtml' of magento which is pull over to WP so when in WP it's all fine but well as of yet nothing here.

<div id="wpfoot">

        if ($userUsername ) {

            if ( strpos($_SERVER['REQUEST_URI'], '/blog/') === FALSE ){     

                $dom = new DOMDocument();
                $dom->validateOnParse = true;
                echo $dom->getElementById('wpfoot');


share|improve this question

2 Answers 2

Add also script and styles:

wp_enqueue_script( 'admin-bar' );
wp_enqueue_style( 'admin-bar' );

and _wp_admin_bar_init()

You must also include the Hooks for register script and styles or include the scripts from the key 'admin-bar' in your head.


I think this was all for display the Admin Bar.

share|improve this answer
I had to comment in the form of an answer. thanks for the help – jeremy.bass Dec 28 '12 at 16:42
share|improve this answer
Please add an explanation to your answer: why could that solve the problem? – toscho Jul 2 at 22:48

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.