Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Dennis Ploetner

    (@realloc)

    The primary site is not part of the blog-collection, right? There is just the WordPress-way via hook:

    add_action( 'wp_head', function() {
        echo '<link rel=”alternate” href=”http://example.com/” hreflang=”x-default” />', PHP_EOL;
    } );
    Thread Starter ciccioesse

    (@ciccioesse)

    No, primary site is part of blog-collection.
    This is the situation:

    <link rel=”alternate” href=”http://example.com/fr” hreflang=”fr_FR” />
    <link rel=”alternate” href=”http://example.com/en” hreflang=”en_US” />
    <link rel=”alternate” href=”http://example.com/de” hreflang=”de_DE” />
    <link rel=”alternate” href=”http://example.com/” hreflang=”it_IT” />

    I want add:
    <link rel=”alternate” href=”http://example.com/” hreflang=”x-default” />

    right?

    Thread Starter ciccioesse

    (@ciccioesse)

    accuracy:

    <link rel=”alternate” href=”http://example.com/de/goofy” hreflang=”de_DE” />
    <link rel=”alternate” href=”http://example.com/goofy” hreflang=”it_IT” />

    <link rel=”alternate” href=”http://example.com/goofy” hreflang=”x-default” />

    Plugin Author Dennis Ploetner

    (@realloc)

    There is – at least at the moment – no separate filter or option that could help to define the x-default. A workaround in your case is the mentioned wp_head-filter:

    add_action( 'wp_head', function() {
        echo '<link rel=”alternate” href=”http://example.com/goofy” hreflang=”x-default” />', PHP_EOL;
    } );
    Thread Starter ciccioesse

    (@ciccioesse)

    Thanks

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

The topic ‘x-default hreflang’ is closed to new replies.