Skip to content
Website design companyWebsite design company
Artofdata Website Designers
  • Web
    • Website Design
      • Portfolio
      • Win new clients with brochure website design
      • Estate Agent Website Designers
      • Elementor Pro
    • Ecommerce
      • WooCommerce
      • Retail clothing websites
    • Graphic Design Reading
    • Social Media
    • SEO Content Writing
    • WordPress Plugin Developers
      • Sequential Invoice Numbers Plugin
  • Internet
    • Domain Names
    • Hosting
    • Fast Woocommerce Hosting
    • Fast Websites – Greener Hosting
  • Pricing
  • Etc.
    • About
    • News
    • Website Design Questionnaire
  • Contact
  • 0118 942 0101
  • Web
    • Website Design
      • Portfolio
      • Win new clients with brochure website design
      • Estate Agent Website Designers
      • Elementor Pro
    • Ecommerce
      • WooCommerce
      • Retail clothing websites
    • Graphic Design Reading
    • Social Media
    • SEO Content Writing
    • WordPress Plugin Developers
      • Sequential Invoice Numbers Plugin
  • Internet
    • Domain Names
    • Hosting
    • Fast Woocommerce Hosting
    • Fast Websites – Greener Hosting
  • Pricing
  • Etc.
    • About
    • News
    • Website Design Questionnaire
  • Contact
  • 0118 942 0101
Website design companyWebsite design company
Artofdata Website Designers
  • Web
    • Website Design
      • Portfolio
      • Win new clients with brochure website design
      • Estate Agent Website Designers
      • Elementor Pro
    • Ecommerce
      • WooCommerce
      • Retail clothing websites
    • Graphic Design Reading
    • Social Media
    • SEO Content Writing
    • WordPress Plugin Developers
      • Sequential Invoice Numbers Plugin
  • Internet
    • Domain Names
    • Hosting
    • Fast Woocommerce Hosting
    • Fast Websites – Greener Hosting
  • Pricing
  • Etc.
    • About
    • News
    • Website Design Questionnaire
  • Contact
  • 0118 942 0101
  • Web
    • Website Design
      • Portfolio
      • Win new clients with brochure website design
      • Estate Agent Website Designers
      • Elementor Pro
    • Ecommerce
      • WooCommerce
      • Retail clothing websites
    • Graphic Design Reading
    • Social Media
    • SEO Content Writing
    • WordPress Plugin Developers
      • Sequential Invoice Numbers Plugin
  • Internet
    • Domain Names
    • Hosting
    • Fast Woocommerce Hosting
    • Fast Websites – Greener Hosting
  • Pricing
  • Etc.
    • About
    • News
    • Website Design Questionnaire
  • Contact
  • 0118 942 0101
  • Request a call back

WordPress Automation

WordPress Automation

Building a Reliable WordPress Category FAQ Automation with Browser automation software, ACF, and TinyMCE

Updating dozens of WooCommerce product categories manually is slow, repetitive, and error‑prone. When each category contains an ACF WYSIWYG field powered by TinyMCE, the process becomes even more tedious. We wanted a solution that could take structured FAQ content from an AI generated (Human edited) CSV file and automatically inject it into the correct category pages inside WordPress — safely, reliably, and at scale.

This article walks through how we engineered a fully modular, production‑ready automation system using Browser automation software, JavaScript ES modules, and a deep understanding of how WordPress, WooCommerce, ACF, and TinyMCE behave under automation.

The Challenge: Automating a Hostile UI

WordPress admin pages are not designed for automation. WooCommerce taxonomy pages load slowly, ACF fields sync asynchronously, and TinyMCE hides the underlying textarea when in Visual mode. On top of that, WordPress doesn’t always redirect after saving a category — sometimes it simply displays a “Category updated” message and waits for user input.

The automation needed to:

  • Log into WordPress securely
  • Parse a CSV containing category names and FAQ HTML
  • Navigate to the correct category
  • Switch TinyMCE into Text mode
  • Inject HTML into the ACF WYSIWYG field
  • Trigger ACF’s hidden field sync
  • Submit the form in a “trusted” way
  • Detect the success message
  • Return to the category list
  • Repeat for all categories

This required a careful blend of DOM events, Browser automation software navigation control, and defensive coding.

Step 1: Parsing the CSV

The CSV contained rows like:

Code

1,”Premium Office Furniture Brands”,”<p>FAQ HTML here…</p>”

We cleaned doubled quotes, extracted each record with a regex, and produced a structured array:

js

[

{ id: “1”, category: “Premium Office Furniture Brands”, faqHtml: “<p>…</p>” },

…

]

This gave us clean, predictable input for the automation.

Step 2: Logging into WordPress

Browser automation software handled the login flow:

  • Navigate to /admin
  • Fill username and password
  • Submit the form
  • Wait for the admin dashboard

We added a verification step to ensure the login succeeded before continuing.

Step 3: Navigating to the Category List

WooCommerce’s category list lives at:

Code

/wp-admin/edit-tags.php?taxonomy=product_cat&post_type=product&show_all_terms=1

We built a dedicated function to load this page and wait for the category table to appear. This became the “home base” for each iteration.

Step 4: Finding the Correct Category

WordPress category names can contain inconsistent spacing, so we normalised the input and used Browser automation software’s hasText filter to locate the exact row.

Once found, we clicked the category using a real DOM click, not Browser automation software’s synthetic click. This bypassed WordPress’s hover‑based UI quirks.

Step 5: Handling TinyMCE and ACF

This was the hardest part.

TinyMCE hides the textarea when content exists

If the field already contains text, TinyMCE loads in Visual mode:

  • The iframe is visible
  • The textarea is hidden (aria-hidden=”true”)
  • Waiting for the textarea to be “visible” causes a timeout

Solution: Always switch to Text mode

We clicked the “Text” tab using a DOM click. This reliably reveals the textarea regardless of initial state.

Injecting the FAQ HTML

Once in Text mode, we filled the textarea directly.

Triggering ACF’s hidden field sync

ACF stores WYSIWYG content in a hidden input:

Code

acf[field_xxx]

Filling the textarea alone does not update this hidden field. We dispatched input and change events manually, then waited until the hidden field contained the new HTML.

This was the key to making the FAQ actually save.

Step 6: Submitting the Form

WordPress sometimes ignores synthetic clicks. We fired:

  • a trusted MouseEvent(‘click’)
  • a trusted submit event
  • and finally form.submit()

This guaranteed the form POST was processed.

Step 7: Handling WordPress’s “Category updated” Message

WordPress does not always redirect after saving a category. Instead, it shows:

Category updated. ← Go to Categories

Rather than relying on this link, we built a deterministic flow:

  1. Wait for the success message
  2. Navigate back to the category list URL explicitly
  3. Wait for the table to load
  4. Continue the loop

This eliminated navigation race conditions and timeouts.

Step 8: Modularising the Entire System

Once the automation was stable, we split it into clean modules:

Code

src/

login.js

loadCsv.js

goToCategoryList.js

findCategoryRow.js

updateCategoryFaq.js

returnToCategoryList.js

main.js

Each module does one job well. This makes the system:

  • maintainable
  • testable
  • extendable
  • production‑ready

The Result

We built a robust automation that:

  • logs into WordPress
  • reads structured FAQ content
  • updates each category safely
  • handles TinyMCE and ACF correctly
  • avoids race conditions
  • works whether fields are empty or already populated
  • scales to all 90 categories

This is the kind of automation that saves hours if not days of manual work, eliminates human error, and gives you a repeatable workflow you can run anytime.

  • We then added a module to enter the JSON‑LD FAQPage schema injection

 

Where to go next

Now that the core automation is modular and stable, we can easily add:

  • Skip‑if‑already‑updated logic
  • Logging and reporting
  • Retry logic for slow WP admin pages
  • Batch processing for multiple CSV files

 

Wordpress automation
  • 1.0 Website Design, 1.3 Wordpress
  • July 27, 2026
  • 4:02 pm
PrevPrevious

WordPress Automation

July 27, 2026

Elementor v Divi

June 11, 2026

Making the move from Divi to Elementor Pro

May 27, 2026

Vectorization

March 30, 2026

Free Website Design

May 19, 2025

News Categories

1.0 Website Design

1.1 Brochure Websites

1.2 Ecommerce

1.3 Wordpress

2.0 SEO

2.1 Logo

2.2 Content Creation

3.0 Locations

PrevPreviousElementor v Divi
Wordpress automation

WordPress Automation

Elementor v Divi

Making the move from Divi to Elementor Pro

vectorization
free-websites

Free Website Design

websites for tradesmen

Websites for Tradesmen

SEO Internal link building explained

Website Internal Link Building Explained

eco-website-designers

The Darkside of Eco Website Design

websites-for-gardeners

Website Design Woodley Reading

Sort by stock for woocommerce

WooCommerce Elementor order by stock quantity

website-for-the-office-chair-man

Saving the environment with used office chairs (Oct 22)

website-for-revalyu

Revalyu Website Launch

get-variation-meta-woocommerce

Woocommerce get variation meta data PHP

website for law firms

Responsive brochure style website. SEO by Artofdata

How to SEO your logo

Logo SEO Search Engine Optimisation

E-Commerce-websites

Retail eCommerce Websites Reading

Website designers Reading News

Professionally written website content

Digital Marketing Agency Reading

Website Design Agency

website-for-clothing-companies

Migration to Woocommerce

custom-website-for-retailers

The Pangbourne Cheese Shop

signalR-website-development

SignalR Development

what-are-citations

SEO: What is Citation and Trust Flow?

SERPs-rankings-explained

What determines your position in the Search Engine Results Pages (SERP)

Budget websites Reading Berkshire

Budget websites Reading Berkshire

websites-for-accountants

Websites for Accountants

websites for law firms

New Site – E J Winter

Gutenberg-WordPress-editor

Gutenberg WordPress Editor

.co .uk domain names

Which domain name?

wordpress websitedesign

WordPress – What is it?

tails of tilehurst dog training web site

Tails of Tilehurst now live!

Get a free no obligation website design quote.

Click here

Tel: 01189 420101
Company Number: 6092965
Copyright Statement.

Website Design Bracknell | Website Design Wokingham |

Terms & Conditions | Privacy Policy

Artofdata.com Ltd
(Web Design Agency)
47 Brooksby Road,
Reading,
Berkshire,
RG31 6LZ

Facebook X-twitter Youtube Pinterest Instagram
Linkedin Reddit Youtube Map-marker-alt Rss
© 2026 ArtofData.com Ltd.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT