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
<div id="loop" class="clear"> | |
<?php // List Pages by Month | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$cat = get_query_var('cat'); | |
$args = array( | |
'paged' => $paged, | |
'cat' => $cat, | |
'post_type' => 'post', |
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
<ul> | |
<?php | |
$args=array( | |
'taxonomy' => 'productcat', | |
'orderby' => 'name', | |
'order' => 'ASC' | |
); | |
$categories=get_categories($args); | |
foreach($categories as $category) { |
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 | |
$myquery = array( | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'productcat', | |
'terms' => array('equip', 'pro-rack', 'slat-tech', 'acrylics' , 'i60-system' , 'prestige', 'shop-x', 'shopfitters'), | |
'field' => 'slug' | |
) | |
), | |
'order' => 'ASC', |
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 $showFactsheets->query( array( 'category__in' => array( 4, 5, 6, 7 ) , 'category__and' => array( 25 ) ) ); ?> |
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 | |
$cat = get_the_category(); | |
$parentCatName = get_cat_name($cat[0]->parent); | |
$parentCatLink = get_category_link($cat[0]->parent); | |
echo '<a href="'.$parentCatLink.'">'.$parentCatName.'</a>'; | |
?> |
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
add_action( 'pre_get_posts', 'dm_exclude_category_from_category' ); | |
function dm_exclude_category_from_category( $query ) { | |
global $wp_the_query; | |
if( $wp_the_query === $query && $query->is_category( array (4,5,6,7) ) ) { | |
$query->set( 'cat', '-25' ); | |
} | |
} |
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 ( ! (in_category( array ( 20,25 ) ) || 'tips' == get_post_type() ) ) : ?> |
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 (is_single() || is_category()) { | |
$category = get_the_category(); | |
$nice_name=array(); | |
foreach($category as $c) | |
{ | |
$parent = $c->category_parent; | |
$parent_cat =get_category($parent); | |
$nice_name[]= $parent_cat->category_nicename; | |
} |
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 $inlinecontentblocks = get_post_meta( $post->ID, 'inlinecontentblocks', true ); | |
foreach( $inlinecontentblocks as $inlinecontentblock){ ?> | |
<div class="inline-thumb"> | |
// here is where I think the below is not right | |
<?php $inlineImage = get_post_custom_values( $inlinecontentblock['content-block-image'] ); | |
if ( $inlineImage ) { ?> | |
<img class="alignleft" title="<?php echo $inlinecontentblock['content-block-title']; ?>" src="<?php echo $inlinecontentblock['content-block-image']; ?>" alt="<?php echo $inlinecontentblock['content-block-title']; ?>" width="120" height="115" /> | |
<?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 | |
global $post; | |
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); | |
if ($children) { ?> | |
<ul> | |
<?php echo $children; ?> | |
</ul> | |
<?php } ?> |
OlderNewer