Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sort_direction="random" to the [gravityview] shortcode #2211

Open
rafaehlers opened this issue Nov 20, 2024 · 6 comments
Open

Add sort_direction="random" to the [gravityview] shortcode #2211

rafaehlers opened this issue Nov 20, 2024 · 6 comments

Comments

@rafaehlers
Copy link
Contributor

According to our doc, that's not yet possible: https://docs.gravitykit.com/article/73-using-the-shortcode

Needs double-checking.

@rafaehlers
Copy link
Contributor Author

@rafaehlers
Copy link
Contributor Author

@Mwalek can you please check this one whenever possible? Be aware of: #1554

@Mwalek
Copy link

Mwalek commented Nov 21, 2024

@rafaehlers It seems possible to sort the result randomly, but the order does not change when the page is refreshed. Btw, I could only sort randomly when using random rand || RAND in the shortcode. E.g:

[gravityview id="312" secret="16e2b02dd26b" sort_direction="rand"]

And I could only reproduce #1554 when a sort_field was included. E.g:

[gravityview id="312" secret="16e2b02dd26b" sort_direction="rand" sort_field="3"]

@rafaehlers
Copy link
Contributor Author

@rafaehlers It seems possible to sort the result randomly, but the order does not change when the page is refreshed. Btw, I could only sort randomly when using random rand || RAND in the shortcode. E.g:

@Mwalek I'm sorry, this is not clear. So, sort=rand works or not? Do the results (entries) change on each refresh or not on the View?

@Mwalek
Copy link

Mwalek commented Nov 26, 2024

@rafaehlers the order does not change when the page is refreshed.

@Mwalek
Copy link

Mwalek commented Nov 26, 2024

When sort_direction="rand" is used, the result is different from the default, but if you refresh the View you will continually see the same "random" output.

@rafaehlers rafaehlers removed their assignment Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants