Multiple Categories

osocooototo

New Member
What I would like to do is add multiple categories that members could be classified as in the admin panel and to where they could be searched for by different categories.

Like in admin panel
Have
category 1
category 2
category 3
so I could classify the sites better.

How would I go about this.
 

Basti

Administrator
Staff member
That is not possible, sorry.
What you could do is create a "tags" input via the custom join forms in admin. Then make a plugin which extends the search.php to include that "tags" field into the search
 

Basti

Administrator
Staff member
Making those newly created field searchable is quite easy.
Lets assume your new field is named "acf_tags"
Edit step #6 if your field is named differently

1) SearchTags
2) SearchTags/languages/english.php ( can be empty )
3) SearchTags/languages/index.htm ( empty )
4) SearchTags/index.htm ( empty )
5) SearchTags/info.php
Code:
<?php
// You must give a name for your Plugin.  The other fields are optional.
$pluginname = 'Search Tags';
$author = 'Basti';
$email = '';
$url = '';
$install = 0;

$version = '1.0';

?>
6) SearchTags/search_search_query_inner.php
Code:
$query .= " OR acf_tags LIKE '%{$word}%'"; // rename according to your field
That should do it
 
Top