Forums Forums Search & Filter Pro Split: Does not work with Elementor Pro and Ele Custom Skin loops

Viewing 10 posts - 31 through 40 (of 47 total)
  • Anonymous
    #239775
    This reply has been marked as private.
    Ross Moderator
    #239811

    Hi Armando

    I think I have a solution for your needs 🙂

    Basically, you want the post widget integration with S&F to be dynamic?

    There is a filter you can use in your functions.php (which we use to attach to the query).

    Essentially, we use this to attach S&F to the Elementor query:

    add_filter( 'elementor/query/query_args', array($this, 'attach_sf_to_posts'), 10, 2 ); //attach S&F to the query

    Which takes 2 params like this:

    public function attach_sf_to_posts( $query_args, $widget  ) {
    ...
    return $query_args;
    }

    So what you could do is, use the same filter, but instead of priority of 10, give it 11 (so it would be fired after S&F did its thing)

    And then you would check if $query_args['search_filter_id'] is set, (if it is, then S&F has attached itself to the query args based on the settings in the posts widget) and then, you could do whatever conditional checks you need before updating to the appropriate the ID.

    Does that make sense?

    🙂

    Ross Moderator
    #239815

    In regards to the pagination count issue… you are entirely correct, its because the post meta doesn’t exist within the valid min / max ranges…

    You’ll have to assign an appropriate default value to those posts – my approach would be to create a query that looks for posts where the meta key doesn’t exists, and assign a value.

    This answer gets you most of the way there:
    https://wordpress.stackexchange.com/a/270482

    But your wp_query, should have a meta query to check if the post meta not exists like this example:
    https://wordpress.stackexchange.com/a/81831

    Thanks

    Anonymous
    #240018
    This reply has been marked as private.
    Ross Moderator
    #240022
    This reply has been marked as private.
    Anonymous
    #240028
    This reply has been marked as private.
    Ross Moderator
    #240079
    This reply has been marked as private.
    Anonymous
    #240126
    This reply has been marked as private.
    Anonymous
    #240141
    This reply has been marked as private.
    Ross Moderator
    #240170
    This reply has been marked as private.
Viewing 10 posts - 31 through 40 (of 47 total)