WordPress.org

Ready to get started?Download WordPress

Forums

WP Document Revisions
[resolved] Use Shortcode with Multiple Taxonomies (2 posts)

  1. harry.rowe
    Member
    Posted 1 year ago #

    I am unable to use the documents shortcode to search simultaneously on two taxonomies created with WCK Custom Taxonomy Creator. I want the intersection (AND) of two previously taxonomy selections. If I use
    [documents doctype="work-inst"]
    I get the two documents I expect.
    If I use
    [documents department="web"]
    I also get the (same) two documents I expect.
    But if I use
    [documents doctype="work-inst" department="web"]
    I get nothing at all.

    It seems this should work, since the arguments should just be passed to get_posts(), but it doesn't. How can I do what I want?

    Thanks

    http://wordpress.org/extend/plugins/wp-document-revisions/

  2. harry.rowe
    Member
    Posted 1 year ago #

    The problem I was having is due to the use of double-quotes to delimit the search terms. While searches on a single taxonomy will work with double-quotes, searches on multiple taxonomies only work with double-quotes.

    This works:

    [documents doctype='work-inst' department='web']

    This may be either undocumented but intended behavior, or a subtle bug in wp_query().

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic