Forums Forums Search & Filter Pro Issue with filtering by custom taxonomy

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #124003

    Hello,

    I have an issue since some time with filtering by one specific taxonomy. The whole filter form is build upon a custom post type, it’s name is companies, but I’m rewriting a link to tech-index 'rewrite' => array( 'slug' => 'tech-index' ),

    Anonymous
    #124012

    I’m not sure why topic was sent while creating, but I will follow up in reply (can not edit my own topic).

    So, I have few of custom taxonomies created for that CPT, and one of them is companies-alphabet (taxonomy=companies-alphabet&post_type=companies), it’s purpose is to add possibility to sort companies by alphabetic letters, in short – on save_post I’m grabbing first alfanumeric letter from post title, and adding that term for this post, so in companies-alphabet I have a, b, c etc terms.

    With plugin form settings, I added it as a taxonomy radio buttons. The form works by ajax after manual pushing search button.

    Now to the issue … when I’m trying to filter only by that alphabet taxonomy, It’s not working. But if I will select some other filtering option and then also a letter, then it works fine. What I noticed in console is some issue with links to which ajax sends requests … here are examples:

    Those works fine, with proper results:
    /companies-type/public-company/?_sft_companies-alphabet=d
    /tech-sector/computer-network-security/?_sft_companies-specialities=big-data&_sft_companies-alphabet=c

    And those ones are not working:
    /compdnies-[0]lph[0]bet/[0]/ (while the proper one should be companies-alphabet/d/ for d letter)
    /comptnies-[0]lph[0]bet/[0]/ (t letter)

    What I also noticed is that every a letter in that link seams to have issues. First is companies in taxonomy name, a letter is changed by the one that was selected to filter with it, and then in alphabet as second part of taxonomy name, all a are replaced with [0].

    I was trying to checking plugin code to find some string replacing code that is also do some changes with URLs, but with no success.

    Anonymous
    #124013
    This reply has been marked as private.
    Trevor
    #124026

    Hi

    With what you are doing with re-writes, I do not follow, so I will have to refer this to the plugin author, to see whether what you are doing can work with our plugin.

    Anonymous
    #124144

    Hey Trevor, this is native WordPress functionality:
    https://codex.wordpress.org/Function_Reference/register_post_type#rewrite

    Trevor
    #124146

    Yes, I know. But I do not know whether that would cause issues for our plugin, which is why I have asked Ross to take a look at this thread and comment.

    Trevor
    #124236

    Hi

    I did check, and Ross has previously confirmed that you cannot do URL rewrites, because we rely on the query strings in our javascript to perform the filter. We are working on a major release, V3, which will allow pretty SEO friendly links, but that is some months away yet.

    Anonymous
    #124983

    Hey Trevor, I would accept this answer, if I would have the same problems with other taxonomies assigned to the same CPT. Also only CPT uses rewrite, not taxonomies. I have no issue with filtering for that CPT and other taxonomies, also this particular one for alphabet works if the filtering query contains at least one more condition, but it’s not working alone.

    So it has no sense for me, cause most of the form is working with rewrite on CPT.

    Trevor
    #124985
    This reply has been marked as private.
    Trevor
    #126649
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 10 total)