How can we help?

If you are looking for support for our PokaTheme, this is the place!

Home Forums PokaTheme support Custom review order in affiliate table block

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #18229
    Goga Bibiluri
    Participant

    Hi,

    I saw default options to display reviews based on rating, date, and name.

    But, now we must rearrange the table and display reviews with custom order.

    How can I do that? When I custom select reviews, it still uses rating to order.

    If there’s a hook or something, let me know. If there’s no such functionality, please take it as a feature request.

    Thanks!

    #18270
    admin
    Keymaster

    Hi Goga!

    If you refer to the Affiliate Tables, yes the custom ordering is a feature we’d like to add but it’s not there yet.

    So if you refer to this block, then yes you have to use the corresponding shortcode instead.

    You can ask us for more info or check our Documentation: https://pokatheme.com/pokatheme-documentation/

    #18348
    Goga Bibiluri
    Participant

    Hello,

    Any news regarding this?

    It isn’t resolved, and you marked it.

    I need to figure out how to reorder casinos in the affiliate table or other blocks.

    Waiting for you,
    Thanks

    #18353
    admin
    Keymaster

    Hi Goga,

    Custom sorting is not available yet. We’re working on some features this period, this is among them, and we’ll try to include it in the next version release.

    But you can contact us on support@pokatheme.com to give you an alternative method with which you will be able to add affiliate tables with custom sorting using the corresponding shortcode.

    #18357
    admin
    Keymaster

    I post the answer here for everyone using PokaTheme v4.

    Custom order can be set if you add the below code to the end of the file “functions.php” of your child theme and use the [affiliates_table] shortcode instead of the block.

    function poka_child_656751221ab0f( $args, $atts ) {
        if ( array_key_exists( 'sort', $atts ) ) {
            if ( 'custom' === trim( strval( $atts['sort'] ) ) ) {
                $args['orderby'] = 'post__in';
            }
        }
        return $args;
    }
    add_filter( 'poka_affiliates_table_query_args', 'poka_child_656751221ab0f', 10, 2 );
    

    Then you could use the [affiliates_table] shortcode (instead of the block) like this:

    [affiliates_table reviews=”312,306,308″ sort=”custom”]

    #18358
    Goga Bibiluri
    Participant

    Thanks!

    #18359
    admin
    Keymaster

    You’re welcome! 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.