Skip to content

Adding PHP code to display dateline in all posts for WordPress

I run a WordPress site, and I’d like to print a dateline (ex: “July 22, 2020 at 1:05 p.m. EDT”) under the featured image at the top of each post, a time of the post’s initial publication. Though datelines are common in news sites and blogs, my theme doesn’t present them as option…

Duplicate checkbox remove in php

I have two tables named bookings and packages. Checked checkboxes are retrieved from bookings table and are working perfectly. But I also need unchecked check boxes from packages table. The problem is checked checkbox values display again. Answer You shouldn’t have two loops. You should only create the …

Dividing up items based on quantity

We have a custom dispatch system where we have orders, if the total quantity within the order exceeds 2 then we need to split the contents over two orders. So for instance… Order contains: Item A …