Skip to content

Instantly share code, notes, and snippets.

@shazdeh
Created November 3, 2013 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shazdeh/7291432 to your computer and use it in GitHub Desktop.
Save shazdeh/7291432 to your computer and use it in GitHub Desktop.
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