Skip to:
Content
Pages
Categories
Search
Top
Bottom

lightbox page from wp_admin_bar

  • Avatar of abyss
    abysshorror
    Member

    @abysshorror

    Hey, I’d like to load a page from the admin bar using lightbox (currently I’m using ColorBox)

    This is what I got so far:

    `

    function admin_bar_add_this(){
    global $wp_admin_bar;
    $newcat= add_query_arg( ‘w-iframe’, ’1′, ‘http://mypage.com/mypost’ );
    $wp_admin_bar->add_node( array( ‘title’ => ‘Post’,
    ‘href’ => $newcat,
    ‘meta’ => array(‘class’ => ‘cboxElement’)) );
    }
    add_action(‘wp_before_admin_bar_render’,’admin_bar_add_this’);
    `

    I’m getting this error on Chrome:
    `jquery.colorbox-min.js:4Uncaught TypeError: Object has no method ‘show’`

    Thanks !

You must be logged in to reply to this topic.