Vai al contenuto Vai alla barra laterale
Sun Mon Tue Wed Thu Fri Sat
12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 12:00 – 20:00 - -
- - - - - - -

Fuso orario del supporto: Asia/Karachi (GMT+05:00)

Questo ticket contiene 0 risposta, ha 1 voce.

Ultimo aggiornamento da marioE-8 6 mese, 1 settimana fa.

Assistito da: Noman.

Autore Post
Gennaio 23, 2025 alle 12:29 pm #16627668

marioE-8

Background of the issue:
I am trying to address a SEO-related bug in the WPML plugin's language handling. The issue occurs when a published post in Italian has a corresponding English post in draft status. When visiting the published Italian post's URL in incognito mode, an alternate language link is generated for the draft English post, which should not occur due to SEO considerations. The issue likely originates in the `head_langs()` function, where post status is not being correctly validated before generating alternate language links. I expected to see: Instead, I got:
Key Details:
- Primary Language: Italian
- Secondary Language: English
- Scenario: Published post in Italian, corresponding English post in draft status
- Problem: Alternate language link () appears for draft posts in page section

Symptoms:
An alternate language link is incorrectly generated for a draft English post when visiting the published Italian post's URL in incognito mode.

Questions:
How can I prevent alternate language links from being generated for draft posts?
Is there a way to modify the `head_langs()` function to correctly validate post status?

L'argomento “[Chiuso] Incorrect Alternate Language Link for Draft Posts” è chiuso a nuove risposte.