wordpress - WP_Query not Working if Taxonomy Term has Single Quotes -


i'm using wp_query retrieve posts based on taxonomy terms. problem wp_query not returning results if term has single quote.

here's relevant portion of args passed wp_query:

[tax_query] => array     (         [0] => array             (                 [taxonomy] => country                 [field] => name                 [terms] => array                     (                         [0] => people's republic of china                     )              )      ) 

i tried escaping quote (e.g. people\'s republic of china) still there no results.

there no problem code other terms without quote work. , if ask, there posts single quotes validated directly querying database (via phpmyadmin).

i know can query using taxonomy id , slug (e.g. 'field'=>'term_id' , 'field'=>'slug') hope not may code has been written use term name.

thanks


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -