Hello,
Thanks for the feedback! May I ask you on what page you are when you try this setting?
This feature works only on a Term Single. For example: My Taxonomy: Term 3. If you use Query Monitor Plugin, you should see that the main WP_Query will have the query var taxonomy set to my-taxonomy.
Screenshot: https://i.imgur.com/EGwF485.png
Can you try to install the plugin, go on your page and open the “Request tab” just like I did?
Thanks!
Regards.
hey!
I just checked and rechecked.
Of course it’s the correct location. See the picture: https://imgur.com/a/Q2ss8SM
By debugging your function, you can see that $taxonomy is empty.
(KINT Debugger on top of Screen)
Change $taxonomy = $query->get('taxonomy'); to $taxonomy = $query->tax_query->queries[0]['taxonomy']; and it works.
I’m not very deep into wp_query and I’m not familiar with the available methods.
Hope that helps, maybe I am doing smth wrong, but i uses only a few plugins and none of these alters queries.
-
This reply was modified 6 years, 3 months ago by
jabbadu.
Hello,
Thanks for the detailed report and screenshot. In fact, you are right, the settings aren’t working correctly on term single page. I’ll add a fix in the next patch. Meanwhile, you add the fix yourself:
In the file \acf-extended\includes\modules\dynamic-taxonomy.php line:415. Replace:
$taxonomy = $query->get('taxonomy');
$taxonomy_obj = get_taxonomy($taxonomy);
With:
$term_obj = $query->get_queried_object();
if(!is_a($term_obj, 'WP_Term'))
return;
$taxonomy = $term_obj->taxonomy;
$taxonomy_obj = get_taxonomy($taxonomy);
Have a nice day 🙂
Regards.
Hello,
Just to let you know that the latest 0.8.5 fixed this issue.
Have a nice day 🙂
Regards.