Skip to main content
Don’t Hide Your WordPress Content From Google and AI

Don’t Hide Your WordPress Content From Google and AI

Is your WordPress site using JavaScript to display vital content? You might be invisible to search engines and AI assistants, missing out on potential customers.

I’ve been building WordPress sites for 17 years, and I’ve seen a lot of trends come and go. One persistent problem I still encounter is critical content hidden behind JavaScript. It’s like putting your best product in a display case with a frosted window. People can see *something* is there, but they can’t make out the details. More importantly, search engines and AI assistants often can’t either.

For a small business, being found online is everything. Whether someone’s searching Google for ‘lunch specials near me today’ or asking an AI assistant for recommendations, your content needs to be immediately readable. If your menu, your services, or your key product descriptions are loaded dynamically with JavaScript, you’re making it much harder for discovery.

The Old Way vs. The New Reality

Years ago, search engines weren’t very good at executing JavaScript. They mostly looked at the initial HTML code. So, if your content only appeared after a script ran, Google often didn’t see it. This led to poor rankings for content that was clearly visible to human visitors.

Today, Google and other major search engines are much more capable. They can, and do, render JavaScript. But here’s the catch: it takes resources. If your JavaScript is complex, slow, or breaks, they might not bother. And even if they do, it adds extra steps and potential points of failure. AI assistants like Google AI Overviews, Gemini, ChatGPT, and Perplexity also rely on structured, easily accessible information to provide accurate answers. If your content is buried, it’s not just Google Search you’re losing out on; it’s the next generation of discovery.

A Real-World Example

I once worked with a local restaurant client. Their WordPress theme was beautiful, very modern, but it loaded their entire daily specials menu using a complex JavaScript application. Customers loved it because it had fancy animations, but the problem was clear: their daily specials – like ‘today’s fresh catch’ or ‘vegan soup of the day’ – weren’t appearing in Google searches. People looking for specific lunch items in their area couldn’t find them, even though the restaurant offered exactly what they wanted. We had to rework the menu display to ensure the core information was present in the initial HTML, making it visible to everyone, including search engine bots and AI.

Why JavaScript-Loaded Content Can Be a Problem

  • Crawl Budget: Search engines have a ‘crawl budget’ for your site. If they spend too much time executing complex JavaScript, they might not crawl as many of your pages, or they might not get around to important content.
  • Rendering Issues: Sometimes, JavaScript fails to execute properly, or it presents content differently to bots than to users. This can lead to important text simply not being seen.
  • Performance: Heavy JavaScript can slow down your site. While not directly about visibility, site speed is a ranking factor, and a slow site provides a poor user experience, which Google also cares about.
  • AI Scrutiny: AI models need clear, unambiguous text. Content hidden behind interactions or complex scripts is harder for them to parse and use in their summaries or recommendations.

How to Check If Your Content is Visible

It’s simpler than you think to check if your important content is visible to bots:

  1. Disable JavaScript in Your Browser: Most browsers let you temporarily disable JavaScript in their developer tools. Visit your key pages (menu, services, product pages) with JavaScript off. If the content disappears, you have a problem.
  2. Use Google Search Console: This free tool offers a “URL Inspection” feature. You can ask Google to fetch and render a page and then view exactly how Googlebot sees your page’s HTML. This is the most accurate way to know.
  3. View Page Source: Right-click on your page and select “View Page Source” (or similar). This shows you the raw HTML that first loads. If your important content isn’t in there, it’s likely being added later by JavaScript.

Making Your Content Accessible

The solution isn’t to remove all JavaScript. Modern web experiences often rely on it. The key is to ensure your critical content – the text that describes your business, products, and services – is present in the initial HTML load.

  • Server-Side Rendering (SSR): For complex applications, this ensures the HTML is fully formed before it reaches the browser, making all content immediately available.
  • Static HTML for Core Content: For WordPress, this often means using the classic editor or Gutenberg blocks effectively. Don’t rely on shortcodes or third-party plugins that pull in content with JavaScript after the page loads.
  • Plain Text Alternatives: If you absolutely must use JavaScript for a dynamic element, consider having a fallback in static HTML that provides the core information.

My own site, chrisalberto.me, scores 100 on all six cards of my website audit and 98–100 on Lighthouse mobile. That’s because I ensure all core content is easily visible and accessible, not hidden behind scripts.

Don’t Let Your Business Stay Hidden

Making sure your content is visible to search engines and AI assistants isn’t just a technical detail; it’s fundamental to your online success. If people can’t find you, they can’t become your customers. This focus on fundamental accessibility is part of every free website audit I offer. It checks your speed, security, SEO basics, and includes an AI search readiness check. You’ll get a plain-English report telling you exactly what to fix first.

Find out more and request your free audit here: chrisalberto.me/contact/?interest=audit