Support

Account

Home Forums General Issues Reverse query a post relationship on a taxonomy? Reply To: Reverse query a post relationship on a taxonomy?

  • Sorry if I wasn’t clear, I know about the default WP behaviour and I need something different. This is how it is set up:

    This Relationship field:

    array (
    				'key' => 'field_5231bd6773a84',
    				'label' => 'Product',
    				'name' => 'category_product',
    				'type' => 'relationship',
    				'return_format' => 'object',
    				'post_type' => array (
    					0 => 'product',
    				),
    				'taxonomy' => array (
    					0 => 'product_cat:3',
    				),
    				'filters' => array (
    					0 => 'search',
    				),
    				'result_elements' => array (
    					0 => 'post_type',
    					1 => 'post_title',
    				),
    				'max' => 1,
    			)

    Is attached to the default Categories:

    'location' => array (
    			array (
    				array (
    					'param' => 'ef_taxonomy',
    					'operator' => '==',
    					'value' => 'category',
    					'order_no' => 0,
    					'group_no' => 0,
    				),
    			),
    			array (
    				array (
    					'param' => 'ef_taxonomy',
    					'operator' => '==',
    					'value' => 'post_tag',
    					'order_no' => 0,
    					'group_no' => 1,
    				),
    			),
    		)

    My question is how to query the category on the product post type template.
    Hope I was clear and thanks so much for your time!