New Landing How can we help? Themeforest Theme Support Joyn How to redirect image URLs to post or page?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Joyn
  • #150185
    mhote
    Member
    Post count: 394

    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? ?

    #150243
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    When you sue the page builder image asset, you can set the link for the image to anything you like

    – Kyle

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register