Support

Account

Home Forums Feature Requests Filter for taxonomy term names Reply To: Filter for taxonomy term names

  • Hi @timothy_h

    Yep, looks like WP only searches the post_title and post_content.
    https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/query.php#L2091

    You may need to hook into a filter to add a custom search to the SQL string. I believe WP contains some filters to modify the SQL, but I’m not sure off the top of my head.

    The get_terms function seems to search for name and slug, so this explains the difference. https://core.trac.wordpress.org/browser/tags/4.2.2/src/wp-includes/taxonomy.php#L1899

    Hope you can find a solution to extend the WP posts search and I hope to heave cleared up the difference

    Thanks
    E