How to Change the WordPress Login Page...
This snippet allows you to easily change the URL of the logo on your WordPress login ...

WPCodeBox
39
WordPress Is Creating Attachment Pages You Don’t Need, you can Stop That with Code
function redirect_attachments() {
if (!is_attachment()) {
return;
}
$attachment = get_post();
$parent_id = $attachment->post_parent;
$parent_post_status = get_post_status($parent_id);
$parent_permalink = get_permalink($parent_id);
$destination = home_url();
$http_status_code = 302;
if($parent_id && $parent_post_status !== 'trash') {
$destination = $parent_permalink;
$http_status_code = 301;
}
wp_safe_redirect($destination,$http_status_code);
exit;
}
add_action('template_redirect', 'redirect_attachments', 1);