• Resolved ant42

    (@ant42)


    Hello!

    When using SEOPress on WordPress multisite with “Your latest posts” setting on homepage (Settings → Reading → “Your homepage displays: Your latest posts”), the canonical tag is rendered with an empty href attribute (on homepage only):

    <link rel="canonical" href="">

    Environment:

    • WordPress 6.9 Multisite
    • SEOPress 9.5
    • This topic was modified 2 months, 3 weeks ago by ant42.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter ant42

    (@ant42)

    Could you please advise — is this a bug? Is there a way to fix it?

    The canonical tag used to be generated before, but disappeared after one of the updates.

    Thank you!

    Plugin Author Benjamin Denis

    (@rainbowgeek)

    Hi,

    we have identified the issue.

    A fix is coming soon with our next major update in February.

    In the meantime you can copy-paste this snippet of code to your functions.php file of your child/theme.

    add_filter( 'seopress_titles_canonical', function( $canonical ) {
    if ( is_front_page() && is_home() ) {
    return '<link rel="canonical" href="' . esc_url( home_url( '/' ) ) . '">';
    }
    return $canonical;
    });
    Thread Starter ant42

    (@ant42)

    OK, thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.