WordPress.org

Ready to get started?Download WordPress

Forums

Query Multiple Taxonomies
taxonomy specific '+' or 'or' (1 post)

  1. tkhan
    Member
    Posted 1 year ago #

    I was wondering if anyone could help me to alter the plugin code to filter results using '+' or ',' depending on which taxonomy is being filtered.

    I found out how to change the files via this post
    http://wordpress.org/support/topic/plugin-query-multiple-taxonomies-change-relation-from-and-to-or?replies=5.

    but I was wondering if it would be possible to take this a stage further with a conditional statement like

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    if is_tax( "tax1" ){
    $query[ $taxonomy ] = trim( implode( '+', $value ), '+' );
    }else if is_tax( 'tax2' ) {
    $query[ $taxonomy ] = trim( implode( ',', $value ), ',' );
    }

    would be possible.

    any feedback would be great

    tkhan

    http://wordpress.org/extend/plugins/query-multiple-taxonomies/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags