Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

"<option value=" vs "<a href=" in language switcher

Need an advice if changing the code could have some positive impact

         

cesneris

8:30 am on Jan 18, 2021 (gmt 0)

5+ Year Member



Hello,

I've got a custom made language switcher on my Wordpress site which includes URLs under the <option value= tag.

A few months ago I ordered an interlink audit from a 3rd party company and their suggestion was to better use <a href= tag considering that <a href= passes the page rank better than the <option value= and could be better for interlinking between different languages.

I know that Google crawls these URLs but what about the weight of it? Is there going to be an impact of changing the <option value= tag for <a href= tag?

URL to the image of how the code looks: [prntscr.com ]

Thanks

not2easy

12:20 pm on Jan 18, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi cesneris and welcome to WebmasterWorld [webmasterworld.com]

The tags are not interchangeable, the "option" tag is used for forms, along with "value" and "select" or "submit" tags as part of your custom script. Changing it to anchor tags "<a href" would cause your script to stop working and the list of "option values" would become a menu. You would want to remove the script itself and the "select" tags if you change to using "<a href=" to offer the language options. You would also want to read up on the use of "hreflang=" tags for these language options URLs.

Third party link checking is useful for some tasks, but they generally do not evaluate intent of links, they only evaluate code. If you are not having any problems with your custom language options script and it handles the task it was designed for, it might be better to leave it as it is. WP is notoriously difficult at managing dynamic headers tasks and has built-in duplicate content issues. Similar content in alternate languages is its own science and not related to link weight so much as user experience and management of otherwise duplicate content.

Some resources to help with for the hreflang= tags are at MOZ: [moz.com...] and Google: [developers.google.com...]

BTW, it is easy to post your code here and is preferable to using screen shots (and longer lasting for future users) with the formatting tools available, information is in that Welcome link above.

phranque

1:02 am on Jan 19, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, cesneris!

whether or not your ultimate solution involves the form option selection or link list selection, you should interlink this set of documents with link rel hreflang elements.
the technical description is in one of the links not2easy supplied above:
Tell Google about localized versions of your page [developers.google.com]