Forum Replies Created
-
AuthorPosts
-
Sittingduck
ParticipantHi,
Thanks so much for the code, but unfortunately it does not seem to be working. Im not getting any errors but its still showing other categories.
I did minor changes to the code:
add_filter("asp_query_args", "asp_query_args_change", 10, 2); function asp_query_args_change($args, $search_id) { $include = array( // Blog ID => Taxonomy term ID 1 => 269 ); if ( isset($include[get_current_blog_id()]) ) { $args['post_tax_filter'] = array( array( 'taxonomy' => 'listing_location', 'post_type' => 'listing', 'include' => array($include[get_current_blog_id()]), 'exclude' => array(), 'allow_empty' => false // Don't allow results, which does not have connection with this taxonomy ) ); } return $args; }i think i did it right based on this: wp-admin/edit-tags.php?taxonomy=listing_location&post_type=listing
And this is the link to that category: search/?postType=listing&listing_location=268
Any help would be greatly appreciated.
Thanks so much!
Sittingduck
ParticipantAwesome! Thank you so much! i will try it and let you know if it worked.
Sittingduck
ParticipantHi,
Thank you.
Well actually all subsites will be only searching the main site and not each other. So we basically have company listings on the main site, and we have subsites based on country. So i would want the USA subsite to only search the main site within the USA category. Would this be possible?
Thanks so much! -
AuthorPosts