0

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?

  • Definitely not a good way to do this. Can't say for sure how this will go. – John Conde Jan 26 '15 at 19:53
  • Why not? Can you recommmend something that I could try to achieve my goal instead of that? – MoritzLost Jan 26 '15 at 19:55
  • Another idea, what if I make everything visible, then store one version in a variable and remove it from the DOM, and if the user clicks the button, I replace the visible version with the one stored in the variable? That way, both versions would be fully available to Google – MoritzLost Jan 26 '15 at 20:07
1

That doesn't sound like a good idea at all. Google isn't likely to be keen on the bilingual content (as it sees it), and there's also the issue of people using old web browsers that may not have JavaScript or CSS support. I suggest finding a way to separate the content into separate URLs.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.