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

Orderby='rand' problem #19

Open
MoeMauhphie opened this issue Feb 26, 2018 · 4 comments
Open

Orderby='rand' problem #19

MoeMauhphie opened this issue Feb 26, 2018 · 4 comments
Labels

Comments

@MoeMauhphie
Copy link

MoeMauhphie commented Feb 26, 2018

Hi there,

When I put a shortcode like the following in a page, it shows nothing.
[wcepe_products category='36' orderby='rand']
But when I change the orderly attribute to something else like title or date, it starts displaying products again.

I have got two more questions but I don't know if this is the right place to ask them or not, if not please advise where I should ask them.

  1. Is it possible to display products from a specific attribute like pa_brand for example?
  2. Is it possible to exclude out-of-stock products?

Many Thanks,

@WPprodigy
Copy link
Owner

Orderby rand should work, I'll have to look into that.

  1. Not at the moment.
  2. Not unless the hide out of stock products settings affects the rest api. Will need to look into that a bit as well.

@MoeMauhphie
Copy link
Author

I really appreciate your help, WPprodigy. And one more thing, as you know WP uses srcsets to display scaled images. That would be great if you could implement that feature in your plugin too. Now this has affected my score on google page speed test.

Regards,

@ateliershen
Copy link

Hi @WPprodigy ,

Thank you for your great plugin!

I have the same issue when I use rand as order. It would be really appreciated if you could give us some hints on how to fix this.

@happysusl
Copy link

@ateliershen "rand orderby" options was removed in WP REST API core, so this time "rand" causes 400 rest api error and not usable without additional code....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants