Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terms must be separated with a comma AND a space after the comma... #183

smeric opened this issue Feb 28, 2018 · 3 comments


Copy link

commented Feb 28, 2018


in the wiki you write that :

Which terms to include (if more than one, separate with commas)
Default: empty"

but on line 340 you do :
$terms = explode( ', ', sanitize_text_field( $original_atts['tax_' . $count . '_term'] ) );

and there is a space in the delimiter string ! so... I was unable to make my tax query work until I found that ;)

thanks for this nice plugin by the way :)


This comment has been minimized.

Copy link

commented Sep 23, 2018

unfortunately that's a common "feature" in wp:-\ the post-by-email function also requires ', ' for [category cat1, cat2, etc]


This comment has been minimized.

Copy link

commented Sep 24, 2018

well, sure :)

but maybe it could be wise to do instead, for example :
$terms = array_map( 'trim', explode( ',', sanitize_text_field( $original_atts['tax_' . $count . '_term'] ) ) );
so it may work with and without white spaces ?

or to give an example in the wiki for people to see they need the whitespaces without having to scan the source code ?

what do you think ?


This comment has been minimized.

Copy link

commented Jan 3, 2019

This has been fixed in 2.9.1. You can now either use a comma or comma-space to separate items in the following parameters:

  • post_type
  • id
  • exclude
  • post_status
  • tax_term
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.