Skip to content

Instantly share code, notes, and snippets.

View Woocommerce-loop-by-Category.php
<?php
$orderby = 'name';
$order = 'asc';
$hide_empty = true ;
$cat_args = array(
'orderby' => $orderby,
'order' => $order,
'hide_empty' => $hide_empty,
'exclude' => array(15 ),
View remove-archive-title-prefix.php
function hap_hide_the_archive_title( $title ) {
// Skip if the site isn't LTR, this is visual, not functional.
// Should try to work out an elegant solution that works for both directions.
if ( is_rtl() ) {
return $title;
}
// Split the title into parts so we can wrap them with spans.
$title_parts = explode( ': ', $title, 2 );
// Glue it back together again.
if ( ! empty( $title_parts[1] ) ) {
View moving wp domain
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');