Skip to main content

Custom / manual sort order for dynamic carousel

Comments

4 comments

  • Ariel H.

    Hi Daniel,

    Thank you for contacting us.

    Unfortunately, this is not possible at the moment. This may require custom code to accomplish it, unfortunately, this is beyond the scope of our support.

    Sorry for the inconvenience

    Best regards,
    Ariel H.

    0
  • Daniel Klotz

    Hi Ariel,

     

    no problem with custom code. But please tell me how the carousel is populated with custom content and which general steps need to be taken in order to accomplish this without hacking. Are there any hooks provided by brizy or any core Wordpress hooks that can be used for this?

    As a first guess I tried to intercept the $query object with the action hook "pre_get_posts" but it seems that the carousel is not using WP_Query here that would incorporate this hook.

    As a brizy pro lifetime license holder, I'd expect at least a bit more support with this. Thanks!

    0
  • Natalia Chitoroaga

    Hi Daniel.

    You can use this hook: 

    add_action('brizy_post_loop_args', function( $args ) {

         // manipulate them here

    return $args;

    });

     

    But, there is no way to know in this hook that this loop is for an archive, posts element or carousel, so if you have multiple posts loops elements on a page the hook above will execute on every loop.

     

    Regards, Natalia 

     

     

    0
  • Daniel Klotz

    Thanks Natalia, that helped! I managed to narrow this down to the use case we have here. You should really add some documentation for brizy-specific hooks btw. Regards, Daniel 

    0

Please sign in to leave a comment.