I’d like to be able to edit a Page or Post that I’m on in WordPress rather than go to the admin panel on left and find the page or post.

I somehow think it used to be there, but when I navigate to a page, it’s not in the Top Admin Menu options.

6 Answers
6

Typically most themes will include an edit link on the post/page itself that takes you directly to the backend to edit the post. If not, you can always add it yourself with code similar to the following in single.php, page.php, etc.:

<?php edit_post_link('(Edit this post)', '<p>', '</p>'); ?>

(See http://codex.wordpress.org/Function_Reference/edit_post_link for more details.)

Also, check out some of the in-place editing plugins that exist such as Front-end Editor that allow you to modify posts without even entering the backend editor.

Update:

Theoretically, you could manually add the link to edit pages in manually using code similar to the following. This may be necessary due to the bug mentioned here in the comments.

function my_admin_bar_link() {
    global $wp_admin_bar;
    global $post;
    if ( !is_super_admin() || !is_admin_bar_showing() )
        return;
    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' );

This can be added to your theme’s functions.php. This is untested, but the idea is sound. May still be affected by the same bug.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *