Forum: Feature Requests

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Feature Requests premium extension please open a new premium support ticket.

[Resolved]Choose which taxonomies to display in results

Home Forums Feature Requests Choose which taxonomies to display in results

This topic contains 9 replies, has 4 voices, and was last updated by  Danilo 2 years, 11 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #30104

    Joseph Barrett
    Participant

    Wondering if there is a way to display only some taxonomies with the results for different search forms, instead of all of them showing. I know you can use css to display:none per each tax type but that solution is just , meh.

    #30108

    Eyal Fitoussi
    Keymaster

    Try the function below in the functions.php file of your theme. You can exclude taxonomies by modify the $tax_output. The example below will exclude the post_tag taxonomy from the results. You can add other taxonomies by adding them with ||.

    #30107

    Joseph Barrett
    Participant

    you da man, finding $tax_output was driving me nuts…

    The only other thing is putting the tax_output in a dif order from how the taxs were created.

    #30106

    giuliapettinau
    Participant

    Where do I get the $tax_output ? Thanks

    #30105

    Eyal Fitoussi
    Keymaster

    @giuliapettinau,
    The $tax_output provided to you by the filter gmw_pt_results_taxonomy.

    #47119

    Joseph Barrett
    Participant

    i updated the plugin and this function no longer works.

    Do i have to specify the custom post type?
    Do I just use the slug of the taxonomy or where do i find a list of gmw_pt_results_taxonomy?
    thanks

    #47145

    Eyal Fitoussi
    Keymaster

    Hi Joseph,
    Use this script instead:

    Let me know if that helps.

    #47161

    Joseph Barrett
    Participant

    Awesome Thank you, so it just needed to know that in the post check the taxonomy for the the one exactly equal to the name.
    I’m going to have to upgrade to the paid plugin soon, it has some great features and is well supported = worth money.

    #47195

    Eyal Fitoussi
    Keymaster

    You are welcome Joseph.

    so it just needed to know that in the post check the taxonomy for the the one exactly equal to the name

    Indeed, but that is exactly what the previous code did. The only difference is that I added another variable ( $taxonomy ) to the filter in one of the previous updates.

    I’m going to have to upgrade to the paid plugin soon, it has some great features and is well supported = worth money.

    I am glad you find my work useful 🙂 And support in anyway is always appriciated.

    Thanks,

    #53937

    Danilo
    Participant

    Hello Eyal,

    I’m using this code but I can only handle product_cat taxonomy (I’m also using woocommerce).

    I guess I was probably using wrong terms or doing synthax errors trying to add more taxonomies in the code but, for exhample, even if I try to hide product_tag replacing post_tag in the code, doesn’t work.

    Can you point me in the right way?

    Kind regards,

    Danilo

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

You must be logged in to reply to this topic.