acctman
acctman

Reputation: 4349

Wordpress perform a search on widget text

Does anyone know of a hack or search plugin that will scan the Widgets Text (Arbitrary text). Currently I'm noticing that only text in the Pages text area is being consider in the search. But I have Text widgets with just as important text on it not being consider in the search results.

Upvotes: 0

Views: 332

Answers (1)

fuxia
fuxia

Reputation: 63556

There are three problems:

  1. The widget text is saved as an serialized array in the options table. Go to /wp-admin/options.php to see it. Searching here is difficult and probably very slow.

  2. A widget has no URI. What should be the link’s target in a search result?

  3. Some widgets contain text which is available elsewhere (latest posts etc.). Which position should be preferred?

You can search in widget options and create nice URIs for widgets using the rewrite API – but 3. is rather difficult. I couldn’t come up with an elegant solution for this.

FYI: There’s a whole network of WordPress hackers on wordpress.stackexchange.com. You may have more luck there.

Upvotes: 2

Related Questions