posts_results filter – additional sort, with a meta value, to move posts to the end of the results, with pagination working

Okay, so why doesn’t this work: The Filter you are using is the posts_results, which is a filter that is applied AFTER the Results are retrieved from the database. Which has the problem that you are describing: Ordering happens on a page-per-page basis. What you want to do is add an order TO the SQL-Query, … Read more

PHP – Converting elements to actual values

You didn’t include value in your checkboxes you have: ‘<input type=”checkbox” name=”Num1[]” />’ . $Thing1->Product1 . “<br />”; Should be: ‘<input type=”checkbox” name=”Num1[]” value=”‘ . $Thing1->Product1 . ‘” />’ . $Thing1->Product1 . “<br />”;

Adding date and time to the same request

If you’re trying to get an ISO8601-formatted datetime, you can just use get_the_date() as it’ll actually return the date and time a post was published. So something like get_the_date( ‘c’ ) should get you the date and time, formatted how you want them (per your comment).

How to group by column a and sum column b and c in a php array

To group and sum the values in your array by the shipping field, you can use a loop and a temporary associative array to store the intermediate results. Here is an example of how you can do this: $result = array(); foreach ($array as $item) { $shipping = $item[‘shipping’]; if (!isset($result[$shipping])) { $result[$shipping] = array( … Read more