Edit link in Admin Bar not working for custom post and Boutique

  • In Progress
    Posted in: Boldial WP  

  • Member
    July 8, 2014 at 8:19 pm #3393


    I don’t understand why the “Edit Post” link in the WP Admin Bar is not showing when I’m viewing any kind of Custom Posts or viewing the WooCommerce Shop page.

    I’ve try to add the following code in my functions.php file but without succes :
    function my_admin_bar_link() {
    global $wp_admin_bar;
    global $post;
    if ( !is_super_admin() || !is_admin_bar_showing() )
    if ( is_single() )
    $wp_admin_bar->add_menu( array(
    ‘id’ => ‘edit_fixed’,
    ‘parent’ => false,
    ‘title’ => __( ‘Edit This’),
    ‘href’ => get_edit_post_link($post->id)
    ) );
    add_action( ‘wp_before_admin_bar_render’, ‘my_admin_bar_link’ );

    I look forward to hearing from you,


    Sorry, this forum is for verified users only. Please Login / Register to continue
    or get 6 months support forum access to all forum topics for a reduced price.

Comments are closed.