Swiss-Mac-User / language-locale-overwrite

This lightweight SEO plugin for WordPress allows overwriting the HTML lang attribute, including on individual Posts and Pages. And adds easy-to-use Alternate Hreflang tags.
https://swissmacuser.ch/wordpress-html-lang-locale-overwrite-plugin/
MIT License
8 stars 1 forks source link

Probable Bug #7

Open abhranil26 opened 3 months ago

abhranil26 commented 3 months ago

I am completely not sure if this is a bug but sure feels like it. Here is what's happening.

Lets assume there are no posts and pages with lang tags modified with this plugin on this wordpress site. I create a page with the tag en and then i create another page with tag es. But when i want to choose alternate pages from the drop down, the option does not appear.

Now when I publish a post with en tag, that when the drop down options is triggered and starts appearing in the pages section. Similarly for every lang code, unless there is a post with that lang code, does not matter if you have a page, it wont appear in the alternate pages drop down. i feel like something in the code needs to be changed.

Also if i delete the posts, the option for dropdown from pages disappears.

abhranil26 commented 3 months ago

i have fixed this here and have confirmed on my site that it is working.