Created
August 29, 2013 10:30
-
-
Save clare485/6376517 to your computer and use it in GitHub Desktop.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (has_term('float-components', 'products')) { ?> | |
put content here | |
<?php } ?> | |
/* | |
* custom taxonomies - add this to functions.php | |
*/ | |
function build_taxonomies() { | |
register_taxonomy( | |
'products', 'product', array( | |
'hierarchical' => true, | |
'label' => 'product category', | |
'query_var' => true, | |
'rewrite' => true | |
) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment