Shortcode Attributes – post__not_in array

With this part: ‘post__not_in’ => array($custom_atts[‘hide’]) you’re actually running: ‘post__not_in’ => array( “7043,7128” ) with [customposts hide=”7043,7128″]. Note that post__not_in expects an array of numbers, not an array with a single CSV element. Have a look at e.g. wp_parse_id_list() and don’t forget to validate the input, to e.g. avoid empty input or a one with … Read more

Why my wordpress site URL does not begin with my domain?

I’ve had similar issues in the past, hosting two different sites with two domains on one host. Here are the two things that have helped me: Update WordPress Settings In the WordPress Admin Dashboard, go to Settings > General. You’ll notice that there’s the WordPress Address (URL) and the Site Address (URL). These control where … Read more

Woocommerce – Shipping tax class based on cart items not using the highest tax available

I have found the answer by override the shipping tax filter // 0% and 21% tax producdts added combined to the cart needs to have 21% shipping tax add_filter(‘woocommerce_shipping_packages’, ‘override_woocommerce_shipping_packages’); function override_woocommerce_shipping_packages($packages) { $shipment_needs_tax = false; foreach ($packages[0][‘contents’] as $cartitem) { if (!empty($cartitem[‘data’]->tax_class)) $shipment_needs_tax = true; } if ($shipment_needs_tax && empty($packages[0][‘rates’][‘flat_rate:3’]->get_taxes())) { $shipcost = $packages[0][‘rates’][‘flat_rate:3’]->get_cost(); … Read more