Undefined index error when saving content on metabox

Resolved by following comment on Tutsplus Tutorial (link included): In function save_meta(), replace this line: if (!wp_verify_nonce($_POST[‘custom_meta_box_nonce’], basename(__FILE__))) with this line: if (!isset($_POST[‘custom_meta_box_nonce’]) || !wp_verify_nonce($_POST[‘custom_meta_box_nonce’], basename(__FILE__))) See full comment here.

wp_query with multiple custom fields

Stupid typo I’m afraid. This: array ( ‘key’ => ‘ys_product_start’, ‘value’ => date(‘Ymd’), ‘compare’ => ‘>=’ ), array ( ‘key’ => ‘ys_product_end’, ‘value’ => date(‘Ymd’), ‘compare’ => ‘<=’ ) Should be like this: array ( ‘key’ => ‘ys_product_start’, ‘value’ => date(‘Ymd’), ‘compare’ => ‘<=’ ), array ( ‘key’ => ‘ys_product_end’, ‘value’ => date(‘Ymd’), ‘compare’ => … Read more