Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Displaying Taxonomy term
This topic contains 13 replies, has 2 voices, and was last updated by antoinedg19 4 years, 3 months ago.
- AuthorPosts
- January 18, 2019 at 10:51 am #20837
Hello,
First of all thank for this very good plugin !
I’ve got a problem for displaying the Taxonomy term.
Everything works great when i’m logged but nothing appear when I’m not. (see screenshots).
Can you check this for me or tell me what to do, to solve this ?Thanks a lot in advance !
Attachments:
You must be logged in to view attached files.January 18, 2019 at 11:52 am #20844Hi!
Thank you for all the details. Are the tags restricted for user by any chance via a plugin or something else?
Also, can you please link me to the login page, I cannot seem to find it. I will probably also need FTP access for this one, to debug the code to see why the tags are missing from the list. Thank you!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 18, 2019 at 3:42 pm #20847You cannot access this content.January 18, 2019 at 4:56 pm #20848Hi,
Thank you, that helps!
I have found two issues. One is that the WPML compatibility was turned off, I had to enable it, so that the language argument is passed. The second issue is however is something else. For some reason, the language resets to the default (french) within WPML during the ajax requests, when not logged in. That affects the get_terms() function, and since there are no french tags, nothing is returned. I guess this is some sort of a cache related thing.
I had to add the following code to the functions.php file to force change the language for the logged in users. Please keep a copy of this:
add_action('asp_query_args', 'asp_force_wpml_lang', 10, 1); function asp_force_wpml_lang($args) { if ( !empty($args['_wpml_lang']) ) { global $sitepress; $sitepress->switch_lang($args['_wpml_lang'], true); } return $args; }
Now you should see the tags in the list.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 21, 2019 at 9:02 am #20860Hello !
Sorry for the WPML compatibility on OFF.
The main langage of this website is French this maybe is the reason.
For the moment we only have english version of this, maybe when the translation in French will be present i could remove the code in the function.php ?Anyway, thanks a lot for your fast and efficient support.
January 21, 2019 at 4:10 pm #20870You are welcome 🙂
I am not sure, once you have the translations, you can try to remove it. I am not sure if it affects that, but it is possible.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 11, 2019 at 11:23 am #21050Hello,
I write you again because the problem with the tags is back, even if your code is still in the function.php.
I’ve got a second problem or misconfiguration (my fault I hope), with the logic AND/OR in my filter search. I will try to explain this cleary with a exemple :
I make a research with this 2 filters : puriFlash 5.125 (in Instrument/Preparative purification) and ELSD (in Detector)
the results should be the items who only have these categories but actually it display all item with 5.125 OR ELSD.Now, I make a 2nd research with 3 filters : puriflash 5.125 and ELSD and RI, the results should be the items who have the tag 5.125 only and ELSD or RI, but actually it display all element with 5.125 OR ELSD OR RI.
How can I configure this correctly ?
The login information are still good
Thanks a lot for your help
Antoine
February 11, 2019 at 4:05 pm #21058Hi Antoine,
The problem here is, that those are not separate filters, but only one single filter with sub-categories. The sub-categories cannot be treated as separate filters, those are part of the single filter.
The logic that controls the individual filters when using checkboxes is this here: https://i.imgur.com/BGm7EWC.png
Best,
You can try each of the options, to see which one is the closest to your needs. The best solution would be to use separate taxonomies for each property, so they are separated much better, and the logic between the filters would then apply.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 11, 2019 at 5:57 pm #21062You cannot access this content.February 12, 2019 at 10:23 am #21072Hi!
It would be probably better for the logic, yes. Because now, for example, if I select something from ‘Detector’ and ‘Instrument’, then depending on the checkbox logic, it is applied as it is a single filter. For multiple taxonomies, the taxonomy logic is also applied between the taxonomy filters.
But before you start doing that, I recommend trying out changing the checkbox logic to maybe the 3rd option first. It was specifically made for cases like this, where there is only one taxonomy, and the more of the filters is selected, the less items are displayed.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 19, 2019 at 9:44 am #21155Hi!
Sorry for the late answer.
I added every filter in a different taxonomy and it’s work much better.I always have the problem for displaying tag but I will come back to you when it all be translated.
I hope the bug exist because the filters are not translated in all language.Thanks,
February 21, 2019 at 3:03 pm #21215You cannot access this content.February 21, 2019 at 4:48 pm #21216Hi!
Unfortunately that feature had been post-poned yet, for various issues. At the moment there is no options for that. The only possibility is if you add a link above the search, that points to the same page, so the browser refreshes the current page.
Best,
I hope I can implement this feature as soon as possible.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 21, 2019 at 4:51 pm #21217Thanks for your fast answer anyway
- AuthorPosts
You must be logged in to reply to this topic.