function widget($args, $instance)
    {
        extract($args);
        $title = empty($instance['title']) ? '' : $instance['title'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
		<ul class="media-list">
			<?php 
        $args = array('hierarchical' => false, 'pad_counts' => true, 'parent' => 0, 'orderby' => 'count', 'order' => 'DESC');
        $topCat = get_categories($args);
        foreach ($topCat as $category) {
            $attrImg = array('class' => 'pull-left', 'alt' => 'Logo ' . $category->name, 'height' => 40, 'width' => 40, 'title' => $category->name);
            echo '<li class="media"><div class="media-left"><a title="' . $category->name . '" class="media-heading" href="' . get_category_link($category->term_id) . '">';
            z_taxonomy_image($category->term_id, array(40, 40, true), $attrImg);
            echo '</a></div><div class="media-body media-middle">';
            echo '<a title="' . $category->name . '" class="media-heading" href="' . get_category_link($category->term_id) . '">' . $category->name . ' <span class="badge">' . $category->count . '</span></a>';
            echo '</div></li>';
        }
        ?>
		</ul>

	<?php 
        echo $after_widget;
    }
Exemplo n.º 2
0
    function oria_slider_template()
    {
        $args = array('hide_empty' => 0);
        $categories = get_categories($args);
        ?>
			<div class="oria-slider slider-loader">
				<div class="featured-inner clearfix">
					<div class="slider-inner">
					<?php 
        foreach ($categories as $category) {
            ?>
						<div class="slide">
							<?php 
            if (function_exists('z_taxonomy_image')) {
                ?>
								<?php 
                if (z_has_taxonomy_image($category->term_id)) {
                    ?>
									<?php 
                    z_taxonomy_image($category->term_id, 'oria-carousel');
                    ?>
								<?php 
                } else {
                    ?>
									<?php 
                    echo '<img src="' . get_stylesheet_directory_uri() . '/images/placeholder.png"/>';
                    ?>
								<?php 
                }
                ?>
							<?php 
            } else {
                ?>
								<?php 
                echo '<img src="' . get_stylesheet_directory_uri() . '/images/placeholder.png"/>';
                ?>
							<?php 
            }
            ?>
							
							<?php 
            echo '<h3 class="slide-title"><a href="' . get_category_link($category->term_id) . '">' . $category->name . '</a></h3>';
            ?>
						</div>
					<?php 
        }
        ?>
					</div>
				</div>
			</div>
			<?php 
    }
Exemplo n.º 3
0
 * @package upBootWP 0.1
 */
get_header();
?>
<section class="content-area">


			<?php 
if (is_category()) {
    //single_cat_title( '<h1 class="archive-title">', true, '</h1>');
    ?>
					 <div class="jumbotron">
                                <?php 
    if (function_exists('z_taxonomy_image')) {
        $attr = array('class' => 'single-featured img-responsive category_image', 'alt' => 'image alt', 'title' => 'category title');
        z_taxonomy_image(NULL, 'careers-featured', $attr);
    }
    ?>
  
                                <div class="container">  
                                    <h1 class="entry-title"><?php 
    $singleCat = single_cat_title();
    ?>
 </h1>
                                    <?php 
    // Show an optional term description.
    $term_description = category_description($category_id);
    if (!empty($term_description)) {
        echo $term_description;
    }
    ?>
Exemplo n.º 4
0
		<?php 
if (have_posts()) {
    ?>

			<header class="page-header">
				<?php 
    the_archive_title('<h1 class="page-title">', '</h1>');
    ?>
                <?php 
    if (is_subcategory()) {
        ?>
                    <div class="category-image">
                        <?php 
        if (function_exists('z_taxonomy_image')) {
            z_taxonomy_image();
        }
        ?>
                    </div>
                <?php 
    }
    ?>
                <?php 
    the_archive_description('<div class="taxonomy-description">', '</div>');
    ?>
			</header><!-- .page-header -->

            <ul class="list-group-items">
                <?php 
    /* Start the Loop */
    while (have_posts()) {
Exemplo n.º 5
0
                                                <?php 
        } else {
            ?>
                                                    <a href="<?php 
            echo get_permalink(1540);
            ?>
">
                                                        <?php 
        }
        ?>

                                                    <?php 
        // z_taxonomy_image($child->term_id);
        $category_link = get_category_link($child->term_id);
        //  if(z_taxonomy_image($child->term_id)==NULL){echo "dd";}
        echo z_taxonomy_image($child->term_id, "medium");
        ?>
</a>
                                                </div>
                                                <div class="product-post-content">
                                                    <?php 
        if ($child->name == "Service") {
            ?>
                                                        <h5><?php 
            echo "<a href='http://" . $_SERVER["HTTP_HOST"] . "/services'>" . $child->name . "</a>";
            ?>
</h5>

                                                    <?php 
        } elseif ($child->name == "Diagnostics") {
            ?>
Exemplo n.º 6
0
$taxonomy = "help-videos";
$tax_terms = get_terms($taxonomy, array('parent' => 0));
foreach ($tax_terms as $tax_term) {
    ?>
                   <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
                            <div class="courses">
                                    <a href="<?php 
    echo esc_attr(get_term_link($tax_term, $taxonomy));
    ?>
" class="overlay">
    
                                                 <?php 
    $c = z_taxonomy_image_url($tax_term->term_id);
    // var_dump($c);
    if (strlen($c) > 0) {
        z_taxonomy_image($tax_term->term_id);
    } else {
        ?>
<img src="<?php 
        bloginfo('template_directory');
        ?>
/img/scheduling.png"><?php 
    }
    ?>
                                    </a>
                                    <div class="courses-content">
                                            <h3><?php 
    echo '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '"  ' . '>' . $tax_term->name . '</a>';
    ?>
</h3>
                                            <!--<p>Gravida nibh vel velit auctor</p>-->
Exemplo n.º 7
0
    // get_terms will return false if tax does not exist or term wasn't found.
    foreach ($termchildren as $child) {
        $term = get_term_by('id', $child, $taxonomy_name);
        $permalink = get_term_link($term->slug, $term->taxonomy);
        ?>
 
            <div class="col-md-4">
                <div class="product-post">
                    <div class="product-post-gal">
                        <a href="<?php 
        echo $permalink;
        ?>
">
                            <?php 
        $key_1_values = get_post_meta(get_the_ID(), 'image');
        echo z_taxonomy_image($term->term_id, "medium");
        ?>
</a>
                    </div>
                    <div class="product-post-content">
                        <h5><?php 
        echo "<a href='" . $permalink . "'>" . $term->name . "</a>";
        ?>
</h5>
                    </div>
                </div>
            </div>


            <?php 
    }