Skip to content

Instantly share code, notes, and snippets.

<?php
$fromtype = get_post_meta(get_the_ID(), 'leven_from_type', true);
if ($fromtype):
?>
<?php echo get_post_meta(get_the_ID(), 'leven_from_type', true); ?>
<?php endif; ?>
@clare485
clare485 / custom taxonomy - if is in custom category show this
Created August 29, 2013 10:30
custom taxonomy - if is in custom category show this 'float-components' is the slug of the product category, 'products' is the name of the taxonomy - which in this case was added in the functions.php
<?php if (has_term('float-components', 'products')) { ?>
put content here
<?php } ?>
/*
* custom taxonomies - add this to functions.php
*/
function build_taxonomies() {
<?php
$meta_value = rwmb_meta('leven_base_text_box');
echo do_shortcode($meta_value);
?>
@clare485
clare485 / woocommerce UIblock bug
Created September 16, 2013 14:08
define( 'CONCATENATE_SCRIPTS', false ); or use 'update jquery' plugin
define( 'CONCATENATE_SCRIPTS', false );
@clare485
clare485 / blockUI error
Created September 19, 2013 08:59
blockUI error blockUI requires jQuery v1.2.3 or later
replace the two block ui files in woocommerce with these:
https://github.com/woothemes/woocommerce/blob/master/assets/js/jquery-blockui/jquery.blockUI.js
https://github.com/woothemes/woocommerce/blob/master/assets/js/jquery-blockui/jquery.blockUI.min.js
This might not work, so try using the jquery updater plugin
This might break the fancybox lightbox, in which case: