Turn plain links into on-page jump anchors

ContentIntermediate~15 min

Before you start

A connected site with content reads on and the content write abilities enabled. Works best on a long post that already has real section headings.

A guide that runs past a couple of thousand words needs a way to jump around, but adding anchor ids to every heading and hand-building the “in this article” list is fiddly, easy to get wrong, and the sort of thing you put off. So the long post stays a wall with no shortcuts, and readers bounce before they reach the section they came for.

This hands the mechanical part to the agent and keeps you as the one who says go.

The prompt
I want to add jump links to [this long post: https://example.com/my-guide/].
Read the post first and change nothing yet. Find the section headings, and
for each one work out a clean anchor id from the heading text. Then hand me
back a plan: the list of headings you found, the anchor id you would give
each, and the "jump to section" list you would add near the top that links
down to them.
Wait for my yes. Only after I approve, add the anchor ids to the headings
and insert the jump list, editing the post body and nothing else. Leave the
status alone so it does not republish, and keep it reversible through the
post's revisions. When you are done, give me the before-and-after for every
heading you touched.

Why this is safe to run

The whole first pass is a read. Pulling the post and mapping out the headings writes nothing, so you see the full plan, every heading and every id, before a single character is saved.

The write half only edits the post body. It never changes the status, so it cannot publish a draft or take a live post down, and every edit lands as an ordinary revision you can roll back from the editor. On top of that the content write ability is off until you switch it on, each call is checked against the capability of the user you bound the agent to, and every write shows up in the Activity Log with the post it changed.

Already connected? You do not have to paste this at all. Ask your agent for the “turn plain links into on-page jump anchors” recipe, or just describe the job, and it runs the same read-plan-approve flow on your own site.

How it works

  1. Read the post and find its section headings, changing nothing.
  2. Work out a clean anchor id for each heading from its text.
  3. Show you the heading list, the proposed ids, and the jump list, and wait for your approval.
  4. Add the anchor ids to the headings and insert the jump list, editing the body only.
  5. Return a before-and-after for every heading it touched.

Questions

Will this republish the post?
No. It edits the body and leaves the status where it was, so a published post stays published and a draft stays a draft. Nothing goes live because of this.
Can I undo it if the anchors are wrong?
Yes. The edit lands as a normal revision, so you can roll the post back to the version before the change from the WordPress editor.