Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Domantas Gudeliauskas

    (@domantasgudeliauskas)

    And this is what we use to replace canonicals for mapped domains:

    <?php
    if ( ! defined( 'ABSPATH' ) ) {
        exit; // Exit if accessed directly.
    }
    if ( ! function_exists( 'design_canonical' ) ) {
        function design_canonical($url) {
            if( is_front_page() ) {
                return home_url( '/' );
            }
            return $url;
        }
    }
    add_filter( 'wpseo_canonical', 'design_canonical' );
    ?>

    Hi @domantasgudeliauskas,

    We’d like the help with the problem with canonical URLs. You have access to premium support by email, so for questions about Yoast premium products, we ask you to contact our support team directly.

    According to the forum guidelines, we’re not able to answer questions about our premium products here, unfortunately.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Issue with canonicals / indeables’ is closed to new replies.