WordPress Sum on Custom Fields

I’ve a custom post type called Questions. Every Question has a custom field called marks (I’m using advanced custom field pro)

I want to generate a test of 50 Marks with random questions. So How do i write wp_query which returns all questions which totals to marks 50.

Also the marks are varied and not consistent. So one question can be of 1 mark another of 5 marks and so on .

Read more here: WordPress Sum on Custom Fields

Leave a Reply

Your email address will not be published. Required fields are marked *