Get the current post parent category ID
How to get the current post parent category ID? Just copy the codes below and paste this your template.
global $post; $category = get_the_category( get_the_ID() ); $parent = $category[0]->term_id
How to replace Woocommerce placeholder image URL? Just copy the codes below. add_filter( 'woocommerce_placeholder_img_src', function( $classes ){ if( !is_product() ) return; // this code is intended to single product only. Remove this for general changes. return get_bloginfo( 'url' ) . '/wp-content/uploads/2016/03/placeholder.jpg'; } );
Copy this code to your wp-config.php of your WordPress folder. define( 'WP_CONTENT_DIR', '/home/site-folder/public_html/custom-wp-content-name-content' ); define( 'WP_CONTENT_URL', 'http://site.com/custom-wp-content-name-content' );
[wdes-column-generator]
function woocommerce_shop_ordering_add_option( $sort_args ){ $orderby_value = isset( $_GET['orderby'] ) ? woocommerce_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); if ( 'alphabetical' == $orderby_value ) { $sort_args['meta_key'] = 'property_priority'; $sort_args['orderby'] = 'meta_value'; $sort_args['order'] = 'DESC'; } return $sort_args; } add_filter( 'woocommerce_get_catalog_ordering_args', 'woocommerce_shop_ordering_add_option' ); function woocommerce_catalog_orderby_add_option( $sortby ) { $sortby['alphabetical'] = 'Sort by STC'; return…
2 column slider <div class="site-inner"> <div class="wrap"> <ul class="two-column-slider"> <li> <img class="alignleft" src="images/author.jpg" alt="Darren Bowden" />Mauris vestibulum tempor tincidunt. Donec interdum pulvinar velit, vel elementum ex semper nec. Duis aliquam nunc sit amet ultrices tempus ultrices tempus.<br /> <br /> <span class="orange-text">Darren Bowden</span> Web and Design </li> <li> <img class="alignleft" src="images/author.jpg" alt="Darren Bowden" />Mauris vestibulum…