Displaying Taxonomy term

This topic contains 13 replies, has 2 voices, and was last updated by antoinedg19 antoinedg19 5 years, 2 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #20837
    antoinedg19
    antoinedg19
    Participant

    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.
    #20844
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #20847
    antoinedg19
    antoinedg19
    Participant
    You cannot access this content.
    #20848
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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 :)


    #20860
    antoinedg19
    antoinedg19
    Participant

    Hello !

    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.

    #20870
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You 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 :)


    #21050
    antoinedg19
    antoinedg19
    Participant

    Hello,

    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

    #21058
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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
    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21062
    antoinedg19
    antoinedg19
    Participant
    You cannot access this content.
    #21072
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #21155
    antoinedg19
    antoinedg19
    Participant

    Hi!

    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,

    #21215
    antoinedg19
    antoinedg19
    Participant
    You cannot access this content.
    #21216
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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.
    I hope I can implement this feature as soon as possible.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #21217
    antoinedg19
    antoinedg19
    Participant

    Thanks for your fast answer anyway

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.