Widget content is stored in the $wpdb->options table as serialized data. You can search that with SQL because to SQL serialized data is just a string.
SELECT option_value FROM {$wpdb->options} WHERE meta_value LIKE "something"
But…
- The table is not indexed for that kind of search
- Searching serialized data is dicey anyway
- And I have no idea how you are going to associate the widgets with
the pages. That does no happen by default and you have not answered
my question about that point.
Put together you aren’t going to have a very efficient query and once you jump through hoops to associate the widgets and pages/posts it is going to be even less efficient still.
Sorry, but the decision to build the site the way you have was badly flawed.
Related Posts:
- History of page, interval of years
- Create custom page templates with plugins?
- Consuming an external API in WordPress?
- Is there a WordPress plugin that registers a plugin file as a custom page template?
- Ways to have multiple front-page.php templates that can be swapped out?
- How to make search engine index PDF files? [closed]
- How can I have two different urls for the same page that load two different templates?
- Page Templates from plugin not working after upgrading WP to 4.7 or upper version
- Custom Taxonomy in plugin and template
- How would implement StackExchange ‘Questions with similar titles’ for the FAQ on my wordpress site
- How can I add a custom header to a custom template in a plugin without using the theme folders
- WP-PageNavi plugin doesn’t work with multiple pages of search results
- Use touch_time() on front-end form via plugin
- how to redirect to my template
- Template for custom post type shows all posts instead of just one
- Custom url structure for custom template
- Creating a wordpress plugin where users can override templates
- How to improve WordPress search
- do_shortcode() doesn’t work if shortcode contained in variable, works if shortcode passed as string
- How do I add advanced custom fields / meta fields to Elasticsearch? [closed]
- plugin to search entire posts, blogs, forum, users [closed]
- Plugin shortcode won’t work on a custom template file [closed]
- How can I reuse the WordPress search form for a custom plugin / widget?
- How to Include a Loop Template File in a Plugin
- What is the best way to mimic a search query within a plugin
- Can we use a webservice with WordPress?
- Is there a way I can find wordpress posts that don’t contain a word?
- List Category Posts rewrite necessitates rewrite of customised templates
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- (FES EDD) New vendor submission page is blank
- Plugin-generated pages use Not Found or Pages Archive templates?
- How to display (plugin?) output on a single page (not a widget, probably not a short code) – template, plugin, combination?
- Advanced Custom Field DatePicker [closed]
- Use of Templates in a Plugin
- Perform internal redirect in WordPress?
- AJAX search as you type? [duplicate]
- WooCommerce search products between price range using WP_Query
- Is there any hook for theme activation ? or something similar?
- changing posts layout in ultimate member profile plugin
- How can I use a file in my plugin as a replacement for single.php on custom-post-type query?
- Timber – Twig post.content returns null can’t create ACF Gutenberg blocks
- Send admin an email when a user’s search has no results
- Where to find the code used to render a page that has a shortcode and a template defined?
- How do I override plugin templates and stylesheets?
- How to set “split_on_numerics” to false in ElasticSearch mapping using ElasticPress? (for proper SKU search in WooCommerce) [closed]
- Plugin Admin Menu Boiler Plate
- How to use template inside plugin shortcode with variables for big HTML code
- Search and Filter Plugin – How to disable redirection
- WordPress Multi-Step Product Search
- Should meta boxes for specific pages be save in their own plugins?
- Call a function for social sharing
- Ajax Call in page theme not working?
- Prevent plug-in scripts on a specific template?
- Pull comments from one page/post into another page/post?
- Show Homepage (only) Hits Count
- How to call php file in theme directory from plugin
- WordPress search shows protected content
- How to search post titles with whole words only, but not the exact word only?
- RSS feeds for specific topics
- WoCommerce Cart is not showing pricing
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- Mobile Menu and Mobile Sidebar missing
- How to check if short code is present in template?
- WordPress hierarchy clarification, does post_type_archive take precedence over taxonomy-term archive?
- What are the disadvantages of using template_redirect for restrictions
- How to prevent redoing get_posts queries and make results available to other scripts?
- Call function with button and return response
- Change Jobs for WordPress templates
- how to do Thematic like this website using wordpress?
- How to exclude a part of a page in search results
- Template conflict with WC Payment Method
- Why is WP template_include overwritting all templates rather than specified page?
- How to add HTML to a template only when user is logged out/ not registered
- How to make wp multisite subdomain exist search
- Remove Url Parameter WordPress
- How can I remove this sidebar from my Search Results page?
- Adding a custom page template to a plugin generated page
- Include post_date in search
- How to echo a plugin’s function into a template?
- How to add dynamic content to posts page, archive, taxonomies, search, author, etc?
- WP plugin calls for custom pages
- custom template only for content
- How to hook into search results template or query?
- Convert HTML5/CSS3 site to WordPress Theme (need a lot of plugins) or just use the API?
- WordPress Search return wrong results
- Extend WordPress Search
- Jigoshop search taxonomy
- Dave’s WordPress Live Search only works when logged in as admin
- wordpress Search function is not working
- Multi-step, live updating search
- Display HTML5 jQuery Audio Player On Front Page
- Divi Template A Few Questions
- My Blog page ( posts page ) theme isn’t changing with the new theme [closed]
- Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]
- LiteSpeed cache image Optimization
- I want to create a search option for CPT using plugin. The search options should search for categories and tags
- Plugin for better Backend Search? [closed]
- Load a custom post type template.html from a plugin
- How do I apply different block supports to different parts of my custom block?
- Is there potential plugin incompatibility if theme has no header.php and footer.php?