Tips for searching categories and/or tags with Global Site Search?
WPMU DEV Community
Tips for searching categories and/or tags with Global Site Search?
Inactive
6 pointsGetting my WPMU DEV WingsI'm new here
seattlehousing
Member
—
25th October 2010 (1 year ago)
The Global Site Search plugin has gotten me almost where I need to be with a multisite search, but I really need the ability to include tags and/or categories in the query. It doesn't look like Global Site Search supports that, but it does look like Post Indexer captures that information. Could anyone point me in a direction that would help me alter the query to include these pieces? Just looking for a little guidance, thanks!
The Global Site Search plugin has gotten me almost where I need to be with a multisite search, but I really need the ability to include tags and/or categories in the query. It doesn't look like Global Site Search supports that, but it does look like Post Indexer captures that information. Could anyone point me in a direction that would help me alter the query to include these pieces? Just looking for a little guidance, thanks!
The thread above refers to the beta version, but that change mentioned should work the same in final version.
Finally, you'll need to customize the Global Site Search to also search the 'sitecategories' table created by the Tags plugin as well. Look at line 212 of Site Search and just add the additional table.
Hiya,
I'm also trying to get Global Site Search to search categories and tags.
I installed global site tags,
deleted " WHERE t.type = 'post_tag' " from line 266 of global-site-tags.php,
and now I am on step 3
"customize the Global Site Search to also search the 'sitecategories' table created by the Tags plugin as well. Look at line 212 of Site Search and just add the additional table."
but I am confused on how to just add the table.
10635 pointsLike some sort of WPMU DEV GodMindblowingly helpful memberLifetime member
Sales & Support Lead
—
28th September 2011 (7 months ago)
#
Hiya Atlanta,
Those instructions refer to the 2.0 Beta. The plugin is now at 2.1.1 and has been drastically rewritten.
The plugin now provides for user-configurable options in the admin which make things more complex to add an additional table to the site search. I haven't tested this yet, but you may be able to add the additional table (by default it would be wp_sitecategories) to the queries on lines 276 and 278.
I'd note that the only way I know to do it would be through using a JOIN or UNION statement which can be a bit expensive in terms of resource usage depending on the amount of data in those tables.
Responses (5)
Sales & Support Lead — 26th October 2010 (1 year ago) #
Hiya seattle,
You could probably do this by first downloading the new Global Site Tags plugin:
http://premium.wpmudev.org/project/global-site-tags
This can be modified to hold info on both categories and tags as per this post:
http://premium.wpmudev.org/forums/topic/global-site-tags-20-beta#post-56526
The thread above refers to the beta version, but that change mentioned should work the same in final version.
Finally, you'll need to customize the Global Site Search to also search the 'sitecategories' table created by the Tags plugin as well. Look at line 212 of Site Search and just add the additional table.
Hope this helps. Thanks!
Member — 4th May 2011 (1 year ago) #
Hiya,
I'm also trying to get Global Site Search to search categories and tags.
I installed global site tags,
deleted " WHERE t.type = 'post_tag' " from line 266 of global-site-tags.php,
and now I am on step 3
"customize the Global Site Search to also search the 'sitecategories' table created by the Tags plugin as well. Look at line 212 of Site Search and just add the additional table."
but I am confused on how to just add the table.
Thx
Member — 19th May 2011 (1 year ago) #
Hello?
Member — 21st September 2011 (8 months ago) #
Look at line 212 of Site Search and just add the additional table.
hello?
Sales & Support Lead — 28th September 2011 (7 months ago) #
Hiya Atlanta,
Those instructions refer to the 2.0 Beta. The plugin is now at 2.1.1 and has been drastically rewritten.
The plugin now provides for user-configurable options in the admin which make things more complex to add an additional table to the site search. I haven't tested this yet, but you may be able to add the additional table (by default it would be wp_sitecategories) to the queries on lines 276 and 278.
I'd note that the only way I know to do it would be through using a JOIN or UNION statement which can be a bit expensive in terms of resource usage depending on the amount of data in those tables.
Become a member