Forum Replies Created

Viewing 2 replies - 16 through 17 (of 17 total)
  • Fixed this issue

    page-links-to.php (line no 212)

    function template_redirect() {
    if ( !is_single() && !is_page() )
    return;
    global $wp_query;
    $link = get_post_meta( $wp_query->post->ID, ‘_links_to’, true );
    if ( !$link )
    return;
    wp_redirect( $link, 301 );
    exit;
    }

    Replace with below code

    function template_redirect() {
    //if ( !is_single() && !is_page() )
    // return;
    global $wp_query;
    $link = get_post_meta( $wp_query->post->ID, ‘_links_to’, true );
    if ( !$link )
    return;
    wp_redirect( $link, 301 );
    exit;
    }

    It is working fine ??

    Fixed this issue

    page-links-to.php (line no 212)

    function template_redirect() {
    if ( !is_single() && !is_page() )
    return;
    global $wp_query;
    $link = get_post_meta( $wp_query->post->ID, ‘_links_to’, true );
    if ( !$link )
    return;
    wp_redirect( $link, 301 );
    exit;
    }

    Replace with below code

    function template_redirect() {
    //if ( !is_single() && !is_page() )
    // return;
    global $wp_query;
    $link = get_post_meta( $wp_query->post->ID, ‘_links_to’, true );
    if ( !$link )
    return;
    wp_redirect( $link, 301 );
    exit;
    }

    It is working fine ??

Viewing 2 replies - 16 through 17 (of 17 total)