• Resolved jose.menendez

    (@josemenendez)


    Hi All,

    First off, I’d like to thank the developers of CFS for their excellent work, I’ve recently discovered CFS and I find it extremely useful and powerful.

    Now to the question, I’m developping a site using CFS almost exclusively to hold the content, I’ve found that when I do a search using the standard searchform/search result page the results I get are only the ones matching the post title which is not on CFS.

    In other words, if I have a post with post title “london travel” and another post with title “visit france” and a custom field with the content “we go to france from london” and I do a search for “london” I’d like to get BOTH posts and I only get the first one, the one where “london” apears on the standard post title.

    Thanks in advance for any and all help!

    This is the code I use to prepare the query, which is pretty standard

    global $query_string;
    
    $query_args = explode("&", $query_string);
    $search_query = array();
    
    foreach($query_args as $key => $string) {
    	$query_split = explode("=", $string);
    	$search_query[$query_split[0]] = urldecode($query_split[1]);
    } // foreach
    
    $search = new WP_Query($search_query);

    https://www.ads-software.com/plugins/custom-field-suite/

Viewing 1 replies (of 1 total)
  • Plugin Author Matt Gibbs

    (@mgibbs189)

    Core WP search only looks through the Post Title and Post Content. It does not search through custom fields. To do so, use a separate search plugin such as SearchWP (recommended) or Relevanssi.

Viewing 1 replies (of 1 total)
  • The topic ‘Searching in CFS values as well as regular posts contents?’ is closed to new replies.