Created
September 22, 2014 19:19
-
-
Save tjhole/59c987802b8e02297997 to your computer and use it in GitHub Desktop.
WORDPRESS : Remove parent from attachment URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wpa60888_attachment_link( $link, $id ){ | |
return home_url() . '/?attachment_id=' . $id; | |
} | |
add_filter( 'attachment_link', 'wpa60888_attachment_link', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment