Is it possible to search for an occurance in all tables. Like when I have different race result tables, I want to be able to query what driver is in what table.
Can this be done using a hook ?
Is it possible to search for an occurance in all tables. Like when I have different race result tables, I want to be able to query what driver is in what table.
Can this be done using a hook ?
Hi,
the regular WordPress search search through all tables. Other than that, I don't really see a possibility for something like this.
Regards,
Tobias
Hello Tobias,
Thanks for your prompt reply.
As I can see the standard WordPress search only works if you use the [table] tags in the content and not when you use wp_table_reloaded_print_table functions in your theme files.
Do you think it will be a great effort to implement a global search in the tables ?
Thank you,
Tom
Hi Tom,
yes, you are correct, this search will only find tables that are inserted by the Shortcode, but not through the template tag function.
Unfortunately, implementing a search that really finds all tables is very hard. Basically, this would require a different method of search, because it is no longer sufficient to search through the posts in the database. Instead, the final generated content needs to be indexed for such a search (because content that is added through template tag functions can otherwise not be found). Thus, you will need to replace the search with an indexing based one, like with a search that uses an external source, like the Google Search.
Best wishes,
Tobias
You must log in to post.