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

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

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -