I know that there are a couple of question about the effect of using display:none
on the Google ranking, but none of those answered my specific question, so hear me out please.
I'm currently working on a WordPress-based website. I want to be able to write posts and pages in both English and German and give visitors the choice to view the content in either language. I've tried out several of the available plugins, all of which didn't exactly fit my needs (because I don't want the menues, the widgets and other things on my site to be translated). So I wrote a small JavaScript function that allows me to put both the English and the German version of the post/page in seperate divs, where one is hidden and the other one is visible (using the CSS properties display:block
and display:none
). I then place a button at the top of the post/page that switches the display property, so that the div that was hidden becomes visible and vice versa (the button triggers the JavaScript function which looks something like that: myDiv.style.disply = "none"
or "block"
)
Will this affect my Google ranking? And how will the content show up on Google?
If this is not a good idea, what could I do instead?