Change a heading or button on an Avada page

ContentIntermediate~10 min

Before you start

Plugin version 1.12.0 or newer with Avada active. The Avada tools are off until you switch them on; turn on Get Avada page content, List Avada elements and Update an Avada element, plus Restore revision if you want the way back. The agent needs edit access to the page, and a layout section also needs a user who can manage site options. WordPress revisions must be on for the page, which they are by default, or the edit returns no restore point; a site that keeps only one revision per post also loses it during the save.

The hero heading on the services page still says last year’s offer, and the button under it points at a form you retired. On an Avada page that text lives inside Fusion Builder shortcodes, so an ordinary content edit would either miss it or break the layout. The Avada tools read the page the way Avada does and change one element in place.

Avada keeps a title’s or a button’s words as the element’s inner text, and things like the button’s link as its settings. The prompt has the agent read both before it touches anything.

The prompt
On our [Services] page (id [42]) I want to change two things in the hero:
the main heading should read [Websites that load fast and sell], and the
button under it should say [Book a call] and link to [/contact/].
Read the page with avada-get-page-content and include_structure, and find
those two elements. For each one, tell me its index, its tag, its current
text and, for the button, its current link setting, so we know they are the
right ones. If either one shows a global library item, stop and tell me,
because that has to be edited in Avada's Library.
Look up the button element with avada-list-elements so the link uses the
setting name and the form Avada expects. Show me each old value beside the
new one and do not save until I say go. Then update each element once, with
the index and fingerprint from the outline, and read the page again after
the first write so the second uses a fresh fingerprint. Give me the
restore_revision_id from each write.

Why this is safe to run

The outline read changes nothing. You see the exact element, its tag and its current text before any write, and the settings lookup means the agent sends a setting Avada actually has, in the form it stores, instead of guessing a name.

The write is narrow. Update an Avada element changes one element’s settings or inner text and refuses anything that would add or remove an element, a stale index or fingerprint, a setting the element does not have, and a value its kind does not accept. A text setting with a double quote, a square bracket or two spaces in a row is refused because Avada’s own builder would drop or change it on its next save. Code blocks and settings that can carry script need a user who may post unfiltered HTML. If saving the page as this user would change other content on it, the call is refused and nothing is saved.

The way back is a WordPress revision. When the site keeps revisions, each write returns restore_revision_id, and Restore revision brings the page back to how it was before that write. Some plugins turn revisions off for the whole site (GeoDirectory is one), and then the write tells you there is no restore point; a WP_POST_REVISIONS line in wp-config.php turns them back on. Every tool here is off until you switch it on, runs as the user you bound the agent to, and lands in the Activity Log.

For more than one element at a time, see reorder or remove sections on a builder page, and for a rollback after the fact, roll back a page builder edit.

Already connected? Ask your agent for the “change a heading or button on an Avada page” recipe, or just tell it which words to change on which page, and it runs the same read-first flow on your own site.

How it works

  1. Read the page with its element outline and find the element you mean.
  2. Confirm its index, tag and current text or setting with you.
  3. Look up the element's settings so the new value uses the name and form Avada stores.
  4. Show the old and new value and wait for your approval.
  5. Update that one element and keep the restore_revision_id the write returns.

Questions

Can it change an element that shows a global library item?
No. A global element is shared, so editing it on one page would change every page that shows it. The tool refuses it and points you at the item itself, which you edit in Avada's Library.
What if someone edits the page while the agent works?
The update names the element by its index and fingerprint from the outline. If the page changed since that read, the fingerprint no longer matches and the call is refused with nothing saved. The agent reads the outline again and starts over.
How do I undo it?
When the site keeps revisions, the write returns restore_revision_id. Passing that id to Restore revision puts the page back as it was, and the restore first saves the current state as a new revision. Avada edits are not in the Changes tab.