Skip to content

Instantly share code, notes, and snippets.

@shazdeh
Created November 3, 2013 15:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Disabling the post edit links from frontpage
<?php
if( ! is_admin() ) {
add_filter( 'get_edit_post_link', '__return_null' );
}
function restore_admin_bar_edit_link() {
remove_filter( 'get_edit_post_link', '__return_null' );
}
add_action( 'wp_footer', 'restore_admin_bar_edit_link' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment