Hi,
Trying to follow help from : http://wpsites.net/wordpress-tips/5-ways-to-redirect-attachment-pages-to-the-parent-post-url/
But the code below doesn’t work.
add_action( 'template_redirect', 'wpsites_attachment_redirect' );
function wpsites_attachment_redirect(){
global $post;
if ( is_attachment() && isset($post->post_parent) && is_numeric($post->post_parent) && ($post->post_parent != 0) ) :
wp_redirect( get_permalink( $post->post_parent ), 301 );
exit();
endif;
}
In Joyn, how can we redirect URLs images, to instead show post or page?
Also – favicon for image pages shows as image, not site favicon? ?