Forums Forums Search & Filter Pro Issue to sort with custom archive template in Elementor Pro

  • This topic has 22 replies, 3 voices, and was last updated 6 years ago by Ross.
Viewing 10 posts - 1 through 10 (of 22 total)
  • Trevor
    #214030
    This reply has been marked as private.
    Anonymous
    #214042
    This reply has been marked as private.
    Trevor
    #214047
    This reply has been marked as private.
    Anonymous
    #214063
    This reply has been marked as private.
    Trevor
    #214221
    This reply has been marked as private.
    Anonymous
    #214335

    Hi,
    This setting doesn’t change anything.

    But I create a second ACF field for the Price as a number field type (the first one is a text field type because I need to display it with separator (dot) on my listings).
    I also tried to deactivate Advanced Post Type Order plugin (https://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/)
    And with this two changes, it works.
    But I need to use Advanced PTO because I can’t let the properties be organized by date.
    It seems like PTO has priority over your plugin and prevents his functioning

    On my current website (not the same theme, no Elementor, not your plugin), but I can use both PTO and a sort by price that is embedded
    in the theme (https://www.nicolas-devillard.fr/en/property-category/location-general/).

    Could it be possible to have Advanced PTO and your plugin works together?
    The default sort on the page opening has to be the PTO manual sort and I offer to option to sort by prices.

    Best,

    David

    Trevor
    #214360

    Ah. The Advanced Post Types order plugin uses pre_get_posts to override our query (many plugin like it do the same) and so it could cause many problems with search settings. That type of plugin is always likely to conflict with any search plugin that has sort options.

    Anonymous
    #214381

    I see.
    I’m not a developper, but could we imagine a way to stop or deactivate pre_get_posts when your query are loaded?
    If so, could you provide this development?

    Trevor
    #214385

    I do not think that is possible. Instead, there must be another way to custom sort the posts on first page load. How many posts does this affect, and do the posts change over time, and how/why?

    Anonymous
    #214396

    This is a real estate website. Posts are properties, divided in 2 main categories (rent and sale).They change often but they are not very numerous (30 to rent and 16 to rent at this moment).
    The website has two archives pages (rent and sale). I’m doing the test on the Rent archives page.

    The agency owner does himself all the daily content updates (delete, add the properties, change manually the order in APTO). So he needs a simple system and can’t waste time with to many settings.
    About two times a week, he makes few changes in PTO order to promote a new property or according to ads he bought on specialized website.

    APTO can use conditions to apply its order (https://www.nsp-code.com/advanced-post-types-order-description-and-usage/using-conditionals-for-sorting-apply/). I tried to use it but I’m not able to. See screenshot (https://www.nicolas-devillard.fr/ndiv2/wp-content/uploads/2019/06/screenshot.png)
    It is also possible to create its own conditional filter with php (https://www.nsp-code.com/advanced-post-types-order-api/filter-create-a-new-sort-conditional/)
    Could this help?

    Another thing.
    I succeeded to sort prices with a special setting in S&F. All the Rent properties have also a child category (furnished rental or unfurnished rental). So I didn’t applied the prices sort to the main category but to the 2 child categories using the including setting (https://www.nicolas-devillard.fr/ndiv2/wp-content/uploads/2019/06/screenshot2.png).
    But then, while PTO is set to order the main category Rent, the default order displayed on the Rent archive page is the WordPress default (by date).
    It seems S&F override APTO… Maybe this can be manage?

    Sorry for this long explanations, but if it can help.
    Best regards,

    David

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