Puddinq.com sharing knowledge

Puddinq.com - blog

Install WordPress commandline with wp cli

This uses the –prompt to avoid using the password on the command line. Download the files Create wp-config.php with the right settings. Initiate the database with the right settings. removing a line from the command line history

WooCommerce cross- and up sells bi-directional update

If your would like one added (and removed) cross (or up) sell product in WooCommerce to automatically ad the ‘current’ product as an up- or cross sell to the connected code. The following code will inspire you:

Get posts not older then 2 months

To adjust the WordPress query to only retrieve posts not older then 2 months use the following query:

Translating strings in WordPress Javascript files

To translate strings in wordpress javascript files you need 3 things: Your javascript file with translatable string A json file with the translations a php file that loads the javascript an connects the translation The javascript The javascript could look like this To translate the javascript Load it in php

1 2 3 14