I had to add a discount for local pickup and at first this looked easy. You can set the costs to be a negative amount. But if the subtotal for the order was smaller then the discount, they got the order for free. So I wanted the discount only if the order subtotal was more […]
You most likely have the analytics script on your site already. There are a few versions and this one uses the _gaq.push one not the ga(…)
var _gaq = _gaq || ;
ga.src = '<?= site_url('analytics.js'); ?>'; // mind you use a valid url
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s);
This line shows a copyright notice with the current year. Add it in your WordPress theme template somwhere.
echo "<span id='copyright'> Copyright © " . date('Y') . " PUDDINQ</span>";
At one site I have a custom role that can only view the orders. The owner wants some users to hav access without a password. Yes this story gets dumber.. He wants to give access by clicking a link. The basic script offered to autologin are hooked in to ‘plugins_loaded’ or ‘wp’. Both these hooks […]
This function writes a csv file to the folder it is run in.
make shortcodes show / not work
$content = str_replace( ']]>', ']]>', $post->post_content );
One thing is to do quality checks, but if you wite your code in a certain way, it can check itself. In your wp-config
Gravity forms is like magic, you can create a form with advanced options without any real knowledge of coding. The basic plugin does not offer a way to show image previews for uploaded images, but with a little extra code it is easily implemntated. The code is just copy paste while changing 2 numbers. Everybody […]
As php is making it’s progress, and we were happy with the speed improvements coming from php 5.6 for php 7.0, 7.2 seems to top that pleasure with a slam dunk. But what are the effects for WordPress? This site is running php 7.2, so it is possible. Should you update? First The core seems to […]
If you embed videos the usual way, youtube sets extra cookies in your users browsers. If you do not want this you need to embed itin a custom way with a custom link