• Hi,

    Is it possible to include file meta in search. Like description (post_content), legend (post_excerpt) and alt (postmeta).

    I think about something like this maybe (description / legend):

    private function getFileConditions($words)
    {
          $words = !$this->config['whole_phrases'] ? explode(' ', $words) : [$words];
          $list  = [];
    
          foreach ($words as $word) {
            $word   = addslashes($word);
            $temp = [];
            $temp[] = 'd.post_title LIKE \'%' . $word . '%\'';
            $temp[] = 'd.post_content LIKE \'%' . $word . '%\'';
    
            $list[] = '(' . implode(') OR (', $temp) . ')';
          }
    
          $list = '(' . implode(') AND (', $list) . ')';
          return $list;
        }

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Include file meta’ is closed to new replies.