We needed to replace some widgets on a Learndash website. This is a website with hundreds of courses, and well – we don’t want to manually look at every page to see if a widget is in use.
Okay, can I just download it?
Can we automate that?
Yes we can! I mean, the searching.. since the replacing also involved changing widget settings. I started writing a foundation, nothing fancy – just an admin page that fires a function that retrieves widgets from all WordPress posts by scanning the _elementor_data
meta field.
We can then present that to the user, this results in a:
- List of all components used in the website, including the occurences and amount of pages
We’ll expand on that a bit, when you click a widget, it’ll show you some more details on the pages it’s used in and allows you to filter the list with a text search field. The search basically filters down the results and finds the text in the _elementor_data
meta field.
How does it look like?
Where do I download it?
I’ve published the code to a Github repository, here:
Leave a Reply