Skip to content

Instantly share code, notes, and snippets.

@norcross
norcross / remove-seo-columns.php
Last active April 7, 2017 10:07
remove Yoast SEO data from post column
<?php
function rkv_remove_columns( $columns ) {
// remove the Yoast SEO columns
unset( $columns['wpseo-score'] );
unset( $columns['wpseo-title'] );
unset( $columns['wpseo-metadesc'] );
unset( $columns['wpseo-focuskw'] );
@BFTrick
BFTrick / update-tax-status.sql
Created July 25, 2013 16:25
Update the tax status of all WooCommerce products.
UPDATE `wp_postmeta`
SET meta_value='taxable'
WHERE meta_key='_tax_status'
@kmaida
kmaida / convert-UNIX-timestamp.js
Last active March 16, 2023 09:31
Convert a UNIX timestamp to user's local time via JavaScript
function convertTimestamp(timestamp) {
var d = new Date(timestamp * 1000), // Convert the passed timestamp to milliseconds
yyyy = d.getFullYear(),
mm = ('0' + (d.getMonth() + 1)).slice(-2), // Months are zero based. Add leading 0.
dd = ('0' + d.getDate()).slice(-2), // Add leading 0.
hh = d.getHours(),
h = hh,
min = ('0' + d.getMinutes()).slice(-2), // Add leading 0.
ampm = 'AM',
time;