This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: Empty search with taxonomy filter not working properly #8724
    ilariaroglieriilariaroglieri
    Participant

    It works like a charm!
    Thank you very much Ernest.
    Looking forward to the update!
    Ilaria

    in reply to: Empty search with taxonomy filter not working properly #8704
    ilariaroglieriilariaroglieri
    Participant

    Hi Ernest,
    this is the code added in fucntions.php:
    [code]add_action( ‘pre_get_posts’, ‘order_by_cf’ );
    function order_by_cf( $query ) {

    if ( is_shop() && $query->is_main_query() || is_product_tag() && $query->is_main_query() || is_tax() && $query->is_main_query() || is_search() && $query->is_main_query() ) {

    $query->set(‘orderby’, ‘meta_value title’);
    $query->set(‘meta_key’, ‘author_name’);
    $query->set(‘order’, ‘ASC’);
    }
    }[/code]

    as you can see orderby accepts two values (meta value for first, title as secondary).
    Of course I would prefer to have this order set for the whole results.
    Please let me know what’s the best thing to do.
    Ilaria

    in reply to: Empty search with taxonomy filter not working properly #8696
    ilariaroglieriilariaroglieri
    Participant

    Hi Ernest,
    a quick update: if i disable “Override the default WordPress search results page” the order in the search page is correct (by custom field i.e. author name), except for empty field searches (which returns the whole catalog).
    If I enable “Override the default WordPress search results page”, empty search performs correctly, but all searches (with empty or filled field) are ordered by title not by custom field.
    Please give me some feedback.
    Ilaria

    in reply to: Empty search with taxonomy filter not working properly #8681
    ilariaroglieriilariaroglieri
    Participant

    Dear Ernest,
    sorry i have to bother you again but i hope this will be simpler.
    I need the search results to be ordered by author name, not by title name. Author name is inserted as custom taxonomy and also in a custom field: i use it in custom field to make a pre_get_posts to set the query and order it by meta key, but of course search template is currently overridden by the plugin.
    Any idea which setting can i use to configure ordering like this?
    Ilaria

    in reply to: Empty search with taxonomy filter not working properly #8653
    ilariaroglieriilariaroglieri
    Participant

    Well thanks Ernest, you’ve been very helpful!
    When will the update with the bug fixed be available?
    I hope very soon, my clients are going crazy about this…
    Best,
    Ilaria

    in reply to: Empty search with taxonomy filter not working properly #8651
    ilariaroglieriilariaroglieri
    Participant

    Dear Ernest,
    thanks for your reply.
    I tried to to what you suggested and now it goes better, but still not working perfectly. In fact now it returns correct results below the input fields but when I select “show more results” it still redirects to the whole catalog. I activated the result override. Now I’ve also tried to disable the “select/deselect all” script I implemented but still there are these problems.
    Please check again.
    Ilaria

    ps. By the way, may I suggest to implement a “select/deselect all” in future updates? I think is really something important missing in this very powerful plugin!

    in reply to: Empty search with taxonomy filter not working properly #8643
    ilariaroglieriilariaroglieri
    Participant

    You cannot access this content.

    in reply to: Empty search with taxonomy filter not working properly #8642
    ilariaroglieriilariaroglieri
    Participant

    You cannot access this content.

    in reply to: Empty search with taxonomy filter not working properly #8636
    ilariaroglieriilariaroglieri
    Participant

    Thanks for your reply.
    Unfortunately it is still not working as expected.
    Let me explain better to you.
    Let’s say I want to see all products inside “archi”.
    So, I select archi from the taxonomy dropdown and press enter without inserting any character in the search.
    I expect the search to show me all results under “archi” category, but what I see is all the catalog.
    I attached you the screenshots of the settings to double check they are what you suggested.
    In the secondo image attached you can see the results it shows after selecting the term from the dropdown and typing enter: as you can see it returns the first categories just as i was selecting all the terms.
    The third screenshot shows you what i see if i press “mostra più risultati” (show more results): i see exactly the whole catalog (as you can see also in the url, it’s not returning the filter but a search on everything).
    The fourth screenshot show you what I would like to see: the taxonomy archive for “archi”. I obtain this precise result if i type “archi” in the search and select the first result (the taxonomy term “archi”).
    So do you think it is possible to fix this?
    Thanks
    Ilaria

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