How to hide part of a WordPress page from AI, without hiding it from visitors
Some things on your site are for visitors, not for AI answers: a summer offer that ends in August, a "Book now" band repeated on every page, a job ad on a service page, a note meant for one season. When ChatGPT or Perplexity quotes your clinic or your shop, you want them to quote your services and your prices, not last year's discount.
This guide shows what you can control, what you can't, and how to leave one page, one block, a few words or any section out of what AI tools read.
First: what "hide from AI" can mean
AI tools get your content in two ways:
- They fetch the HTML page, like a browser, and pull the text out of it.
- They read a clean copy you offer, such as a Markdown version of the page, which is shorter, cheaper for them and easier to read correctly.
Anything on a public page can be fetched by anyone. So nothing private belongs on a public page, hidden or not. What you can decide is which pages crawlers may fetch, and what the clean copy you hand to AI tools contains. That second part matters more every month: an agent that asks for Markdown and gets it works from that copy, not from your HTML.
The whole site, or a whole folder: robots.txt
robots.txt tells each crawler, by name, which paths it may fetch:
User-agent: GPTBot
Disallow: /offers/
It works per path and per crawler, and only for crawlers that obey it. It can't remove a section from a page; a page is either fetched or not. Use it when you want a whole area of the site left alone.
One page: noindex, or "Hide this page from AI"
A page marked noindex (in Yoast SEO, Rank Math or WordPress itself) asks search engines not to list it, and several AI crawlers honour it too. It is the right choice for thank-you pages, internal pages and old landing pages.
If you want a page to stay in Google but out of what AI tools read, noindex is too strong. With WP Markdown, open the page in the editor and tick Hide this page from AI in the What AI sees box. The page stays as it is for visitors and search engines, and AI tools get no Markdown copy of it. Pages you mark noindex are left out automatically.
One part of a page
There is no standard HTML attribute that tells AI tools to skip a section. Google's data-nosnippet is a Google Search control; other AI tools don't follow it. Hiding a section with CSS doesn't help either: the text is still in the page.
What works is leaving the part out of the clean copy itself. WP Markdown builds that copy from the page your visitors see, and leaves out whatever you mark, in whatever you build with:
- Gutenberg: select a block, open the Block tab, and turn on Hide from AI under WP Markdown. To hide only a few words, select them and press Hide selected words in the same panel, or choose Hide from AI in the text toolbar. Hidden words are marked in blue with an eye icon in the editor; visitors see nothing different. This also works on blocks inside your site templates.
- Classic editor and ACF text fields: select the words and press the eye button in the toolbar.
- Elementor: open any widget, section or container, go to the Advanced tab, and turn on Hide from AI.
- Divi, Beaver Builder, Bricks, theme sections and custom fields: open the page while logged in, click Hide parts from AI in the admin bar, then click the part. Choose On this page only, or Everywhere it appears for a section your theme repeats on every page, such as a "Book now" band. The plugin then reads the page's Markdown copy again to confirm the text is gone.
Everything you pick is listed under Settings → WP Markdown → Hidden from AI, with a button to show each part to AI again.
Check what AI actually gets
Don't guess. In the editor, the What AI sees box opens the exact copy AI tools receive, and View as AI in the admin bar does the same for any page you are looking at. You can also ask for it the way an agent does:
curl -s -H "Accept: text/markdown" https://yoursite.com/treatments/whitening/
What is worth hiding
- Time-limited offers. An AI answer can repeat an expired discount for months.
- Sections repeated on every page: booking bands, newsletter boxes, "why choose us" blocks. Leaving them out keeps each page's copy about that page.
- Things meant for one audience: job ads on service pages, internal notes, event banners.
Keep your services, prices, opening hours and FAQs in: that is what you want AI tools to quote.
Summary
robots.txt decides which paths a crawler may fetch, and noindex keeps a page out of search. To keep one page, one block, a few words or one section out of AI answers while visitors still see it, leave it out of the clean copy AI tools read. WP Markdown does that from the editor you already use, then shows you the result.