* A Simple Category Template
*/

get_header(); ?> 

	<div class="container">
		
		<?php the_breadcrumb(); ?>
		
		<div class="block block-intro">
			<div class="text-block">
				<h1 class="b-title"><?php single_cat_title( '', true ); ?></h1>
				<p><?php echo category_description(); ?></p>
			</div>
			<div class="thumb-block">
				<img src="<?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(NULL, 'landscape-4x3'); ?>" />
			</div>
		</div>

	</div><!-- end of .container -->

	<?php

		/*	
		*	We need to determine if the current category has a parent.
		*	If it does not then it is a landing page
		*	If it does then it is a category article listing page
		*/

		$current_category = get_queried_object();
Example #2
1
 function import_wp_object($wp_category)
 {
     $this->id = (int) $wp_category->term_id;
     $this->slug = $wp_category->slug;
     $this->title = $wp_category->name;
     $this->description = $wp_category->description;
     $this->parent = (int) $wp_category->parent;
     $this->post_count = (int) $wp_category->count;
     //Alessandro: plugin "Categories Images"
     $this->image = z_taxonomy_image_url($wp_category->term_id);
 }
?>
		<?php 
//Get all categories name
$terms = get_the_terms($post->ID, 'area');
$post_id = $post->ID;
?>
		<tbody>
		<tr>
			<td valign="top">
				<table>
					<tbody>
					<tr valign="top">
						<td width="50%">
							<img src="<?php 
if (function_exists('z_taxonomy_image_url')) {
    echo z_taxonomy_image_url($terms[0]->term_id);
}
?>
" alt="" usemap="#Map2">
						</td>
						<td valign="top" style="width: 50%;">
							<table border="0" cellpadding="2" cellspacing="0"
							       style="font-family: 'Century Gothic', 'Lucida Sans', 'Trebuchet MS', Verdana; margin: 0px; padding: 0px; color: #000000; font-size: 12px;">
								<tbody style="margin: 0px; padding: 0px;">
								<tr style="margin: 0px; padding: 0px;">
									<td valign="top" style="margin: 0px; padding: 0px;">
										<div id="country" style="margin: 0px; padding: 0px; width: 400px;">
											<ul style="margin: 0px; padding: 0px; list-style: none;">
												<?php 
$args = array('post_type' => 'distributor', "area" => $terms[0]->slug, 'post_status' => 'publish', 'posts_per_page' => -1, 'caller_get_posts' => 1);
$my_query = null;
Example #4
1
<?php

/**
 * TAG TEMPLATE
 */
get_header();
$background_image = function_exists('z_taxonomy_image_url') && z_taxonomy_image_url(get_query_var('tag_id')) != "" ? z_taxonomy_image_url(get_query_var('tag_id')) : koala_get_header_background();
?>

	<section class="header header-category">
		<?php 
include locate_template('layouts/top-bar.php');
?>
		<div class="background post-slider-background" style="background-image:url('<?php 
echo esc_url($background_image);
?>
');"></div>
		<div class="shadow"></div>
		<div class="wrapper-body">
			<div class="categorytitle">
				<h1><i class="fa fa-tags"></i><?php 
esc_html(single_tag_title());
?>
</h1>
			</div>
		</div>
	</section>

	<section class="page-content">
		<div class="wrapper-body">
			
function whats_hot_tabs()
{
    $args = array('type' => 'post', 'parent' => 80, 'orderby' => 'slug', 'taxonomy' => 'category', 'hide_empty' => 1);
    $categories = get_categories($args);
    $i = 1;
    foreach ($categories as $category) {
        echo '<li id="tabHeader_' . $i . '" title="' . $category->name . '">';
        if (function_exists('z_taxonomy_image_url')) {
            $icon = z_taxonomy_image_url($category->cat_ID);
            if (!empty($icon)) {
                $url = $icon;
            } else {
                $url = get_bloginfo('stylesheet_directory') . '/images/icon-default.png';
            }
        }
        //first get the current category ID
        $cat_id = $category->cat_ID;
        //then i get the data from the database
        $cat_data = get_option("category_{$cat_id}");
        //and then i just display my category image if it exists
        if (isset($cat_data['cat_url'])) {
            $caturl = $cat_data['cat_url'];
        } else {
            $caturl = "/";
        }
        echo '<span class="icon" style="background-image: url(' . $url . ')"></span>';
        echo '<a href="' . $caturl . '" title="' . $category->name . '"><span class="title">' . $category->name . '</span></a>';
        echo '</li>';
        $i++;
    }
}
Example #6
1
</div>
	<h1><?php 
the_title();
?>
</h1>
  <ul>
   <?php 
foreach (get_categories() as $cat) {
    ?>
   <a href="<?php 
    echo get_category_link($cat->term_id);
    ?>
">
    <li class="col-xs-6 col-sm-3 col-md-3 col-lg-3">
     <img src="<?php 
    echo z_taxonomy_image_url($cat->term_id);
    ?>
" />
      <h2><?php 
    echo $cat->cat_name;
    ?>
</h2>
   </a>
   </li>
   <?php 
}
?>
  </ul>
</div>
<?php 
get_sidebar('right');
} elseif (is_post_type_archive('interview')) {
    if (get_theme_mod('mbdmaster_interview_archive_image', '')) {
        $image_url = get_theme_mod('mbdmaster_interview_archive_image', '');
    }
} elseif (is_post_type_archive('award')) {
    if (get_theme_mod('mbdmaster_award_archive_image', '')) {
        $image_url = get_theme_mod('mbdmaster_award_archive_image', '');
    }
} elseif (is_post_type_archive('film')) {
    if (get_theme_mod('mbdmaster_film_archive_image', '')) {
        $image_url = get_theme_mod('mbdmaster_film_archive_image', '');
    }
    // Taxonomy archive pages
} elseif (is_tax()) {
    if (z_taxonomy_image_url()) {
        $image_url = z_taxonomy_image_url();
    }
    // Blog Home page
} elseif (is_home() || is_front_page()) {
    if (is_home()) {
        $context = 'page_for_posts';
    } else {
        $content = 'page_on_front';
    }
    // Determine context: is this the frontpage or the blog page?
    $page_id = 'page' == get_option('show_on_front') ? get_option($context) : get_the_ID;
    // WP_Query arguments
    $args = array('post_type' => 'page', 'p' => $page_id);
    // The Query
    $query = new WP_Query($args);
    // The Loop
Example #8
0
 * @since Twenty Fourteen 1.0
 */
get_header();
$posts_page = get_page(get_option('page_for_posts'));
$title = $posts_page->post_title;
$desc = $posts_page->post_content;
if (has_post_thumbnail($posts_page->ID)) {
    $image = wp_get_attachment_image_src(get_post_thumbnail_id($posts_page->ID), 'single-post-thumbnail');
}
$car_details = get_post_meta($posts_page->ID, 'car_details', true);
$images = miu_get_images($posts_page->ID, 800, 600);
$terms = wp_get_post_terms($posts_page->ID, 'carmodels', array("fields" => "all"));
foreach ($terms as $term) {
    $term_id = $term->term_id;
    $term_name = $term->name;
    $cat_logo = z_taxonomy_image_url($term->term_id);
}
?>
<section class="banner-block-img" style="background:url('<?php 
_e($image[0]);
?>
') no-repeat scroll 0 0 / 100% auto; ">
<div class="container">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
	<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 ">
	<div class="lompo1">
            <?php 
if (!empty($cat_logo)) {
    ?>
	<img src="<?php 
    _e($cat_logo);
Example #9
0
function mostdiscussed_loader()
{
    require_once get_template_directory() . '/custom_functions/sipping.php';
    global $wpdb, $current_user;
    $id = $_POST['id'];
    $limit = $id + 5;
    if (is_user_logged_in()) {
        global $current_user;
        get_currentuserinfo();
        @($moca = unserialize($current_user->Choosed_Mocha));
        if ($moca == false) {
            $moca = array();
        }
        $posts_array = $wpdb->get_results("select * from wp_posts where `post_type` = 'post' and `post_status` = 'publish' group by ID Order by (select count(comment_post_ID) FROM wp_comments WHERE comment_post_ID = ID ) DESC limit {$id},5");
    } else {
        $posts_array = $wpdb->get_results("select * from wp_posts where `post_type` = 'post' and `post_status` = 'publish' group by ID Order by (select count(comment_post_ID) FROM wp_comments WHERE comment_post_ID = ID ) DESC limit {$id},5");
    }
    foreach ($posts_array as $r) {
        $post_datetime = $r->post_date;
        $explode = explode(' ', $post_datetime);
        $newDate = $explode[0];
        $post_date = date('M d,Y', strtotime($post_datetime));
        $cat_array = wp_get_post_categories($r->ID);
        $cat_id = $cat_array[0];
        $post_author = $r->post_author;
        if (is_user_logged_in()) {
            $moca = unserialize($current_user->Choosed_Mocha);
            $user_block = unserialize($current_user->blocked_users);
            if (count($moca) == 0) {
                $moca = array();
                $check = !in_array($cat_id, $moca);
            } else {
                $check = in_array($cat_id, $moca);
            }
            if (count($user_block) == 0) {
                $user_block = array();
                $check_user = !in_array($post_author, $user_block);
            } else {
                $check_user = !in_array($post_author, $user_block);
            }
        } else {
            $moca = array();
            $user_block = array();
            $check = !in_array($cat_id, $moca);
            $check_user = !in_array($post_author, $user_block);
        }
        if ($check & $check_user) {
            $meta = get_post_meta($r->ID);
            $args = array('post_id' => $r->ID);
            $comments = get_comments($args);
            $views = $wpdb->get_results("select SUM(views) as views from wp_views where post_id='{$r->ID}'");
            $view = $views[0]->views;
            $term_name = get_term_by('id', $meta[mocas][0], 'category')->slug;
            ?>

                <div class="normal_post_war chima" id="<?php 
            echo $limit;
            ?>
">

                    <div class="top_rating_cont">

                        <!--Categori Image-->

                        <div class="top_post_pic_cont"><?php 
            $userdata = get_userdata($r->post_author);
            ?>

                            <div class="top_cat_pic"><img src="<?php 
            if (z_taxonomy_image_url($meta[mocas][0]) != false) {
                echo z_taxonomy_image_url($meta[mocas][0]);
            } else {
                echo get_site_url() . "/wp-content/themes/cafemocha/custom-images/no-image.jpg";
            }
            ?>
" height="48px" width="48px"></div>

                        </div>

                        <!--Categori Image-->

                        <!-- Post Description -->

                        <div class="top_post_des">

                            <a href="<?php 
            echo get_permalink($r->ID);
            ?>
"><?php 
            echo $r->post_title;
            ?>
</a>

                            <?php 
            if ($meta[attached_file][0] != '') {
                ?>

                                <a href="<?php 
                //echo $meta[attached_file][0];
                ?>
"></a>

                            <?php 
            }
            ?>

                        </div>

                        <!-- Post Description -->

                        <!-- Sip -->

                        <div class="top_post_sip">

                            <ul>

                                <?php 
            if (is_user_logged_in()) {
                ?>

                                    <li><a href="javascript:void(0)" class="vote_up" onclick="sip_it('<?php 
                echo $r->ID;
                ?>
')"></a>Sip it</li>

                                    <li><a href="javascript:void(0)" class="vote_down" onclick="spit_it('<?php 
                echo $r->ID;
                ?>
')"></a>Spit it</li>

                                <?php 
            } else {
                ?>

                                    <li><a href="javascript:void(0)" class="vote_up" onclick="login_msg()"></a>Sip it</li>

                                    <li><a href="javascript:void(0)" class="vote_down" onclick="login_msg()"></a>Spit it</li>

                                <?php 
            }
            ?>

                            </ul>

                        </div>

                        <!-- Sip -->

                    </div>

                    <!--End .top_rating_cont-->

                    <div class="normal_rating_bottom_cont">

                        <ul>

                            <li><a href="<?php 
            echo get_bloginfo('url') . '/category/' . $term_name;
            ?>
"><?php 
            echo get_term_by('id', $meta[mocas][0], 'category')->name;
            ?>
 </a></li>

                            <li class="author">

                                <div class="publishby">

                                    <p>Published By</p>

                                    <a href="<?php 
            if ($meta[anonymous][0] == "") {
                echo get_bloginfo('url') . '/profile-page-template/?user_id=' . $r->post_author;
            } else {
                echo 'javascript:void();';
            }
            ?>
"><?php 
            if ($meta[anonymous][0] != "") {
                echo 'Anonymous';
            } else {
                $post_name = $userdata->post_name;
                if ($post_name == 1) {
                    echo $userdata->user_login;
                } else {
                    echo $userdata->Alternative_User;
                }
            }
            ?>
</a>

                                </div>

                                <p>Post Date</p>

                                <a><?php 
            echo $post_date;
            ?>
</a>

                            </li>

                            <?php 
            $sip_it = get_sipit($r->ID);
            $spit_it = get_spitit($r->ID);
            $sip = $sip_it - $spit_it;
            ?>

                            <li style="position:relative;"><a href="#" class="sip sip_up_<?php 
            echo $r->ID;
            ?>
"><?php 
            echo $sip;
            ?>
</a>

                                <ul style="display:none;">



                                    <li class="sip_pop"><p>Sip it</p><a href="#" class="sip_it_up_<?php 
            echo $r->ID;
            ?>
"><?php 
            echo $sip_it;
            ?>
</a></li>

                                    <li class="spit_pop"><p>Spit it</p><a href="#" class="spit_it_up_<?php 
            echo $r->ID;
            ?>
"><?php 
            echo $spit_it;
            ?>
</a></li>

                                </ul>

                            </li>

                            <li><a href="#" class="view"><?php 
            if ($view != "") {
                echo $view;
            } else {
                echo '0';
            }
            ?>
 views</a></li>

                            <li><a href="<?php 
            echo get_permalink($r->ID);
            ?>
" class="comment"><?php 
            echo count($comments);
            ?>
 comments</a></li>

                        </ul>

                    </div>

                    <!--End .top_rating_bottom_cont-->

                </div>

                <!-- Post Section -->

                <?php 
        }
    }
    die;
}
Example #10
0
function getCategoryImage($categoryId)
{
    return z_taxonomy_image_url($categoryId);
    //return get_option('_category_image' . $categoryId);
}
?>
<main id="main" role="main">
<?php 
if (false) {
    ?>
<main id="main" role="main" style="background-image: url('<?php 
    the_field('page_background_photo');
    ?>
');>"><?php 
}
?>
	<div class="container">
		<div class="heading">
			<?php 
foreach (get_the_terms($PID, 'flatterbox_type') as $cat) {
    $catimage = z_taxonomy_image_url($cat->term_id);
    $catname = $cat->name;
}
?>
			
			<h1><?php 
the_field('who_is_this_for', $PID);
?>
's <?php 
echo $catname;
?>
</h1>
		</div>
		<ul id="status-bar" class="status-cart">
			<li class="active">View Sentiments</li>
			<?php 
Example #12
0
        if($index%3==0){
?>
        	<div class="row">
<?
        }
?>
            <div class="col-sm-4 collection-box">
                <div class="single-collection-img"><a href="<?=get_permalink($results[0]->ID);?>"><span class="overlay"><p><?_e('SEE THE COLLECTION');?></p></span><img class="img-responsive" src="<?=z_taxonomy_image_url($term->term_id); ?>" /></a></div>
                <div class="single-collection-title"><h3><a href="<?=get_permalink($results[0]->ID);?>"><?=$term->name?></a></h3></div>
            </div>
            
            <!--
            <a href="<?=get_permalink($results[0]->ID);?>">
				<span class="col-sm-4 collection-box">
					<span class="img-wrapper">
						<span class="single-collection-img"><img class="img-responsive" src="<?=z_taxonomy_image_url($term->term_id); ?>" /></span>
						<span class="overlay"><p>SEE THE COLLECTION</p></span>
					</span>
					<span class="single-collection-title"><h3><?=$term->name?></h3></span>
				</span>
            </a>
            -->
<?
            if($index%3==2){
?>
            </div>
<?
            }
        }
?>
		</div>
Example #13
0
</li>
				</ol>
			</div>

		</div>


		<link rel="stylesheet" type="text/css" href="<? bloginfo('template_url'); ?>/css/component.css" />
		<script src="<? bloginfo('template_url'); ?>/js/modernizr.custom.js"></script>
		<script src="<? bloginfo('template_url'); ?>/js/masonry.pkgd.min.js"></script>
		<script src="<? bloginfo('template_url'); ?>/js/imagesloaded.js"></script>
		<script src="<? bloginfo('template_url'); ?>/js/classie.js"></script>
		<script src="<? bloginfo('template_url'); ?>/js/animonscroll.js"></script>
<script type="text/javascript">
// 
new AnimOnScroll( document.getElementById( 'grid' ), {
	minDuration : 0.4,
	maxDuration : 0.9,
	viewportFactor : 0.2
} );
// 
var banner_height = $(window).height()*0.8;
$('.product-banner').css('background', 'url(<? if (function_exists('z_taxonomy_image')) echo z_taxonomy_image_url($genre->term_id); ?>) top center no-repeat')
	.height(banner_height);
$('.product-list .filter-bar').css('marginTop', banner_height-120);
</script>


<?
get_footer()
?>
Example #14
0
function archiveHeader()
{
    $img = '';
    $classes = [];
    $parents = get_parent_cats();
    if (function_exists('z_taxonomy_image_url') && is_archive() && !is_tag()) {
        $img = z_taxonomy_image_url(array_values($parents)[0]->term_id);
        if ($img) {
            $classes[] = 'header';
        }
    }
    ?>
  <figure class="archiveheader <?php 
    echo implode(' ', $classes);
    ?>
">
      <img src="/wp-includes/images/blank.gif" style="background-image:url(<?php 
    echo $img;
    ?>
)">
      <figcaption>
      <div class="overview">

          <?php 
    if (function_exists('nav_breadcrumb')) {
        nav_breadcrumb();
    }
    ?>
          <ul class="category_structure">
            <?php 
    $args = array('child_of' => get_query_var('cat') ? get_query_var('cat') : 1, 'title_li' => '', 'show_option_none' => '');
    wp_list_categories($args);
    ?>
          </ul>
          
      </div>
     
       
        <?php 
    get_search_form();
    ?>

      </figcaption>
        <?php 
    if ($img && !empty($data['caption'])) {
        echo '<small>';
        echo __('Copyright: ', 'amnesty');
        echo $data['caption'] . '</small>';
        echo '</small>';
    }
    ?>
      </small>
  </figure>
  <?php 
}
Example #15
0
<?php

/**
 * CATEGORY TEMPLATE
 */
get_header();
$background_image = function_exists('z_taxonomy_image_url') && z_taxonomy_image_url() != "" ? z_taxonomy_image_url() : koala_get_header_background();
?>

	<section class="header header-category">
		<?php 
include locate_template('layouts/top-bar.php');
?>
		<div class="background post-slider-background" style="background-image:url('<?php 
echo esc_url($background_image);
?>
');"></div>
		<div class="shadow"></div>
		<div class="wrapper-body">
			<div class="categorytitle">
				<h1><?php 
single_cat_title('', true);
?>
</h1>
				<?php 
if (category_description() !== "") {
    echo "<hr>" . category_description();
}
?>
			</div>
		</div>
Example #16
0
                echo $src;
                ?>
" />
                                <?php 
            }
            break;
        }
    }
    ?>

                        <?php 
    if (taxonomy_exists('categoria-da-evidencia')) {
        ?>
                            <?php 
        foreach (get_the_terms(get_the_ID(), 'categoria-da-evidencia') as $cat) {
            $src = z_taxonomy_image_url($cat->term_id, 'single-thumb-square');
            if ($src) {
                ?>
                                    <img src="<?php 
                echo $src;
                ?>
" />
                                <?php 
            }
            break;
        }
    }
    ?>
                    </div>
                    <p>
                        <?php 
/**
 * get faq categories
 * @return array
 */
function gsw_get_faq_categories()
{
    global $sitepress;
    $terms = get_terms('faq_cat', array('orderby' => 'count', 'hide_empty' => 0));
    $categories = array();
    foreach ($terms as $term) {
        $categories[] = array('id' => $term->term_id, 'original_id' => icl_object_id($term->term_id, 'faq_cat', true, $sitepress->get_default_language()), 'title' => array('rendered' => $term->name), 'image' => z_taxonomy_image_url(icl_object_id($term->term_id, 'faq_cat', true, $sitepress->get_default_language())));
    }
    return $categories;
}
Example #18
0
 /**
  * 
  * This functon will genetarte from taxonomy
  *
  * @return string
  */
 function html_query_tax($tax_term)
 {
     $image = NULL;
     if (function_exists('z_taxonomy_image_url')) {
         $image = z_taxonomy_image_url($tax_term->term_id, 'full', NULL);
     }
     $content = array('title' => $tax_term->name, 'media' => NULL, 'image' => $image, 'text' => $tax_term->description);
     $this->html_base($content);
 }
Example #19
0
								'post_status' 		=> 'publish',
								'orderby'			=> 'menu_order',
								'order' 			=> 'ASC',
								'numberposts' 		=> 1,
								'suppress_filters' => 0
							);
							$results = get_posts( $args );
                            if($index%4==0){
                ?>
                            <div class="row">
                <?
                            }
                ?>
                            <div class="col-sm-3">
                            	<div class="single-collection">
									<div class="single-collection-img"><a href="<?=get_permalink($results[0]->ID);?>"><img class="img-responsive" src="<?=z_taxonomy_image_url($featured_collection->term_id); ?>" /></a></div>
									<div class="single-collection-title"><h3><a href="<?=get_permalink($results[0]->ID);?>"><?=$featured_collection->name?></a></h3></div>
								</div>
                            </div>
                <?
                            if($index%4==3){
                ?>
                            </div>
                <?
                            }
                        }
                    }
                ?>
                </div>
                <div class="view-all-btn"><a href="<?=(ICL_LANGUAGE_CODE=='en'?"":'/'.ICL_LANGUAGE_CODE)?>/collections"><?_e('All Collections');?> ></a></div>
            </div>
 function nxs_getPostImage($postID, $size = 'large', $def = '')
 {
     $imgURL = '';
     global $plgn_NS_SNAutoPoster;
     if (!isset($plgn_NS_SNAutoPoster)) {
         return;
     }
     $options = $plgn_NS_SNAutoPoster->nxs_options;
     $options['sImg'] = defined('NXSAPIVER') && NXSAPIVER == '2.15.11' ? 1 : 0;
     if (empty($options['imgNoCheck']) || $options['imgNoCheck'] != '1') {
         $indx = rand(0, 2);
         $iTstArr = array('https://www.bing.com/s/a/hpc12.png', 'https://www.apple.com/global/elements/flags/16x16/usa_2x.png', 'https://s.yimg.com/rz/l/yahoo_en-US_f_p_142x37.png');
         $imgURL = $iTstArr[$indx];
         $res = nxs_chckRmImage($imgURL);
         $imgURL = '';
         if (!$res) {
             $options['imgNoCheck'] = '1';
         }
     }
     if ($options['sImg'] == 1) {
         return $options['useSSLCert'] . '/logo2.png';
     }
     //## Featured Image from Specified Location
     if ((int) $postID > 0 && isset($options['featImgLoc']) && $options['featImgLoc'] !== '') {
         $afiLoc = get_post_meta($postID, $options['featImgLoc'], true);
         if (is_array($afiLoc) && $options['featImgLocArrPath'] != '') {
             $cPath = $options['featImgLocArrPath'];
             while (strpos($cPath, '[') !== false) {
                 $arrIt = CutFromTo($cPath, '[', ']');
                 $arrIt = str_replace("'", "", str_replace('"', '', $arrIt));
                 $afiLoc = $afiLoc[$arrIt];
                 $cPath = substr($cPath, strpos($cPath, ']'));
             }
         }
         $imgURL = trim($options['featImgLocPrefix']) . trim($afiLoc);
         if ($imgURL != '' && stripos($imgURL, 'http') === false) {
             $imgURL = home_url() . $imgURL;
         }
     }
     if ($imgURL != '' && $options['imgNoCheck'] != '1' && nxs_chckRmImage($imgURL) == false) {
         $imgURL = '';
     }
     if ($imgURL != '') {
         return $imgURL;
     }
     //## Featured Image
     if ($imgURL == '') {
         if ((int) $postID > 0 && function_exists("get_post_thumbnail_id") && function_exists('has_post_thumbnail') && has_post_thumbnail($postID)) {
             $imgURL = wp_get_attachment_image_src(get_post_thumbnail_id($postID), $size);
             $imgURL = $imgURL[0];
             if (trim($imgURL) != '' && substr($imgURL, 0, 4) != 'http') {
                 $imgURL = site_url($imgURL);
             }
         }
     }
     if ($imgURL != '' && $options['imgNoCheck'] != '1' && nxs_chckRmImage($imgURL) == false) {
         $imgURL = '';
     }
     if ($imgURL != '') {
         return $imgURL;
     }
     //## plugin/categories-images
     if ((int) $postID > 0 && function_exists('z_taxonomy_image_url')) {
         $post_categories = wp_get_post_categories($postID);
         foreach ($post_categories as $c) {
             $cat = get_category($c);
             $imgURL = trim(z_taxonomy_image_url($cat->term_id));
             if ($imgURL != '') {
                 break;
             }
         }
         if ($imgURL != '' && substr($imgURL, 0, 4) != 'http') {
             $stURL = site_url();
             if (substr($stURL, -1) == '/') {
                 $stURL = substr($stURL, 0, -1);
             }
             if ($imgURL != '') {
                 $imgURL = $stURL . $imgURL;
             }
         }
     }
     if ($imgURL != '' && $options['imgNoCheck'] != '1' && nxs_chckRmImage($imgURL) == false) {
         $imgURL = '';
     }
     if ($imgURL != '') {
         return $imgURL;
     }
     //## YAPB
     if ((int) $postID > 0 && class_exists("YapbImage")) {
         $imgURLObj = YapbImage::getInstanceFromDb($postID);
         if (is_object($imgURLObj)) {
             $imgURL = $imgURLObj->uri;
         }
         $stURL = site_url();
         if (substr($stURL, -1) == '/') {
             $stURL = substr($stURL, 0, -1);
         }
         if ($imgURL != '') {
             $imgURL = $stURL . $imgURL;
         }
     }
     if ($imgURL != '' && $options['imgNoCheck'] != '1' && nxs_chckRmImage($imgURL) == false) {
         $imgURL = '';
     }
     if ($imgURL != '') {
         return $imgURL;
     }
     //## Find Images in Post
     if ((int) $postID > 0 && $imgURL == '') {
         $post = get_post($postID);
         $imgsFromPost = nsFindImgsInPost($post, $options['useUnProc'] == '1');
         if (is_array($imgsFromPost) && count($imgsFromPost) > 0) {
             $imgURL = $imgsFromPost[0];
         }
     }
     //echo "##".count($imgsFromPost); prr($imgsFromPost);
     if ($imgURL != '' && $options['imgNoCheck'] != '1' && nxs_chckRmImage($imgURL) == false) {
         $imgURL = '';
     }
     if ($imgURL != '') {
         return $imgURL;
     }
     //## Attachements
     if ((int) $postID > 0 && $imgURL == '') {
         $attachments = get_posts(array('post_type' => 'attachment', 'posts_per_page' => -1, 'post_parent' => $postID));
         if (is_array($attachments) && count($attachments) > 0 && is_object($attachments[0])) {
             $imgURL = wp_get_attachment_image_src($attachments[0]->ID, $size);
             $imgURL = $imgURL[0];
         }
     }
     if ($imgURL != '' && $options['imgNoCheck'] != '1' && nxs_chckRmImage($imgURL) == false) {
         $imgURL = '';
     }
     if ($imgURL != '') {
         return $imgURL;
     }
     //## Default
     if (trim($imgURL) == '' && trim($def) == '') {
         $imgURL = $options['ogImgDef'];
     }
     if (trim($imgURL) == '' && trim($def) != '') {
         $imgURL = $def;
     }
     return $imgURL;
 }
Example #21
0
}
?>
    <div class='main-slider col-xs-12 fullWidth'>
    <ul class="category fullWidth">
        <li>
            <div class='block-special row padding-bottom-20 fullWidth'>
                <h1 class='header-title col-xs-12 text-center'> <?php 
single_cat_title("");
?>
</h1>
                <?php 
echo category_description("");
?>
            </div>
            <img src='<?php 
echo z_taxonomy_image_url();
?>
' alt='<?php 
single_cat_title("");
?>
' title="<?php 
single_cat_title("");
?>
">
        </li>
    </ul>
    </div><!-- main slider -->


<?php 
include_once "left_sidebar.php";
Example #22
0
        <div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 academy-borderoutr zh_faq_new">
            <div class="row">
                <?php 
$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>';
/**
 * Thumbnail column value added to category admin.
 *
 * @access public
 * @param mixed $columns
 * @param mixed $column
 * @param mixed $id
 * @return void
 */
function z_taxonomy_column($columns, $column, $id)
{
    if ($column == 'thumb') {
        $columns = '<span><img src="' . z_taxonomy_image_url($id, NULL, TRUE) . '" alt="' . __('Thumbnail', 'zci') . '" class="wp-post-image" /></span>';
    }
    return $columns;
}
	</div>
	<div id="page_content_right">
		<div id="product_index" style="width: 95%; text-align: right;">
		</div>
		<?php 
if (have_posts()) {
    ?>
			<table border="0" cellpadding="5" cellspacing="5">
				<tbody>
				<tr>
					<td>
						<p>
							<strong><span style="font-size: 14pt;">
									<img src="<?php 
    if (function_exists('z_taxonomy_image_url')) {
        echo z_taxonomy_image_url(get_queried_object()->term_id);
    }
    ?>
" width="700" height="255"
									     alt="pro topb01">
								</span></strong>
						</p>

						<p><strong><span style="font-size: 14pt;"><?php 
    echo single_term_title();
    ?>
</span></strong></p>

						<?php 
    echo term_description();
    ?>
<?php

/*
*	Template Name: Category Markenarchitektur
*
*/
get_header();
$cat = get_queried_object();
$cat_slug = $cat->slug;
$cat_name = $cat->cat_name;
$cat_desc = $cat->category_description;
if (function_exists('z_taxonomy_image')) {
    $category_image = z_taxonomy_image_url($cat->term_id, 'header-article');
    if ($category_image == '') {
        $category_image = site_url() . '/wp-content/uploads/2015/06/work-header-1440x465.jpg';
    }
}
if (ICL_LANGUAGE_CODE == 'de') {
    $static_button = 'Weitere Projekte';
    $subhead_name = 'Über Markenarchitektur';
    $cir_title_1 = 'Strategie';
    $cir_title_2 = 'Kommunikation';
    $cir_title_3 = 'Erlebnis';
    $cir_text_1 = 'Wir sind überzeugt, dass jede Marke eine individuelle und nachhaltige Strategie benötigt, um langfristig erfolgreich zu sein. Nur ein durchdachter strategischer Plan sorgt für Stabilität und Konsistenz des Markeneindrucks an den Berührungspunkten mit der Marke entlang der Customer Journey. Für die Architektur der Marke ist die Strategie das Fundament des Markenhauses.';
    $cir_text_2 = 'Wir entwickeln die Kommunikation einer Marke allumfassend und für alle Kommunikationskanäle. Von der passenden Sprache, über emotionale Bilderwelten, bis hin zur Kommunikation in allen Kanälen, denken wir Kommunikation immer vernetzt. Im Austausch zwischen Marke und Mensch geht es für uns nicht nur um die Vermittlung von Informationen, sondern vor allem um den Transfer von Emotionen.';
    $cir_text_3 = 'Wir schaffen Räume für Marken, die ein umfassendes Markenerlebnis garantieren. Ob mobil, temporär, stationär oder virtuell, ob Event, Akademie, Messestand, Office, Shop oder Showroom - ein Markenerlebnis kann viele Ausprägungen und Facetten haben. Immer aber ist er der Ort, an dem die Marke zuhause ist. Hier wird sie zum Gastgeber und ihre Gäste erleben sie gleichermaßen ehrlich wie emotional.';
} else {
    if (ICL_LANGUAGE_CODE == 'en') {
        $static_button = 'Next Projects';
        $subhead_name = 'About Brand Experience';
        $cir_title_1 = 'Strategy';
Example #26
0
    echo '<li class="subpageMenu ' . $class . '" id="item' . $j++ . '"><a href="' . get_the_permalink() . '">' . get_the_title() . '</a></li>';
}
echo '</ul></div>';
?>
			</div>
			<div class="page-content project-inner-page-content">
				<div class="col-sm-7 col-sm-offset-1">
					<?php 
$location_addresss = '';
while (have_posts()) {
    the_post();
    $args = array('orderby' => 'name', 'order' => 'ASC', 'fields' => 'all');
    $terms = wp_get_post_terms(get_the_id(), 'project_categories', $args);
    foreach ($terms as $term) {
        $tax_term_id = $category->term_taxonomy_id;
        echo '<div class="resource-logo hidden-sm"><img src="' . z_taxonomy_image_url($tax_term_id, NULL, TRUE) . '" alt=""></div>';
        break;
    }
    echo '<h2>' . get_the_title() . '</h2>';
    ?>
					<div class="info-wrap">
						<p class="small-text"><img align="middle" src="<?php 
    echo get_template_directory_uri();
    ?>
/images/cal.png" class="outimg" alt="">
						<span class="bold">
							<?php 
    echo ucwords($sri_locale['date'][$lang]);
    ?>
:
						</span>
Example #27
0
        public static function footer_country_func()
        {
            ob_start();
            ?>
		<?php 
            $taxonomy = array('article_country_cat');
            $args = array('hide_empty' => false, 'hierarchical' => true, 'pad_counts' => false, 'parent' => 0);
            $parents = get_terms($taxonomy, $args);
            foreach ($parents as $key => $parent) {
                ?>
		<div class="group2">
			<div class="origdiv">
				<h4><?php 
                echo $parent->name;
                ?>
</h4>
				<ul>
				<?php 
                $param = array('taxonomy' => $taxonomy, 'parent' => $parent->term_id, 'hide_empty' => false);
                $subcategories = get_categories($param);
                foreach ($subcategories as $sub) {
                    ?>
					<li>
						<a href="<?php 
                    echo get_term_link($sub);
                    ?>
">
							<img src="<?php 
                    if (function_exists('z_taxonomy_image_url')) {
                        echo z_taxonomy_image_url($sub->term_id);
                    }
                    ?>
" alt="">
							<?php 
                    echo $sub->name;
                    ?>
						</a>
					</li>
				<?php 
                }
                ?>
				</ul>
			</div>
		</div>
		<?php 
            }
            ?>
		<!-- // end new template shortcode  -->
		<?php 
            return ob_get_clean();
        }
<?php

$category = get_category(get_query_var('cat'));
$cat_id = $category->cat_ID;
$style = get_option("cat_layout_{$cat_id}") ? get_option("cat_layout_{$cat_id}") : ot_get_option('blog_style', 'video');
if ($style != 'blog') {
    $cat_header_style = get_option("cat_header_{$cat_id}") ? get_option("cat_header_{$cat_id}") : ot_get_option('cat_header_style', 'carousel');
    if ($cat_header_style == 'carousel') {
        $con_top_cat_video = ot_get_option('con_top_cat_video');
        $number_item_cat = ot_get_option('number_item_cat');
        echo do_shortcode('[tm_cat_videos condition="' . $con_top_cat_video . '" count="' . $number_item_cat . '" categories="' . $cat_id . '"]');
    } elseif ($cat_header_style == 'banner') {
        $cat_height = get_option("cat_height_{$cat_id}") ? get_option("cat_height_{$cat_id}") : '';
        $cat_link = get_option("cat_link_{$cat_id}") ? get_option("cat_link_{$cat_id}") : '';
        if (function_exists('z_taxonomy_image_url')) {
            $cat_img = z_taxonomy_image_url();
        }
        ?>
            <div class="category-banner" <?php 
        if ($cat_height) {
            echo 'style="height:' . $cat_height . 'px"';
        }
        ?>
>
            	<?php 
        if ($cat_link) {
            echo '<a href="' . $cat_link . '">';
        }
        ?>
                <?php 
        if (isset($cat_img) && $cat_img) {
Example #29
0


                    <div class="normal_post_war chima" id="10">

                        <div class="top_rating_cont">

                            <!--Categori Image-->

                            <div class="top_post_pic_cont"><?php 
            $userdata = get_userdata($r->post_author);
            ?>

                                <div class="top_cat_pic"><img src="<?php 
            if (z_taxonomy_image_url($meta[mocas][0]) != false) {
                echo z_taxonomy_image_url($meta[mocas][0]);
            } else {
                echo get_site_url() . "/wp-content/themes/cafemocha/custom-images/no-image.jpg";
            }
            ?>
" height="48px" width="48px"></div>

                            </div>

                            <!--Categori Image-->

                            <!-- Post Description -->

                            <div class="top_post_des">

    public function widget($args, $innce)
    {
        $title = apply_filters('widget_title', $innce['title']);
        // before and after widget arguments are defined by themes
        echo $args['before_widget'];
        if (!empty($title)) {
            echo $args['before_title'] . $title . $args['after_title'];
        }
        $args = array('type' => 'post', 'child_of' => 0, 'parent' => '', 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 1, 'hierarchical' => 1, 'exclude' => '', 'include' => '', 'number' => '', 'taxonomy' => 'category', 'pad_counts' => false);
        ?>
        <div id="main-content" class="main-content">


            <div id="primary" class="content-area">
                <div id="content" class="site-content" role="main">
                    <?php 
        $categories = get_categories($args);
        if ($categories) {
            foreach ($categories as $category) {
                $category_id = $category->term_id;
                $img_url = z_taxonomy_image_url($category_id);
                if (!empty($img_url)) {
                    echo '<img src="' . $img_url . '" />';
                }
                if (!empty($category_id)) {
                    echo '<p>Category: <a href="' . get_category_link($category->term_id) . '" title="' . sprintf(__("View all posts in %s"), $category->name) . '" ' . '>' . $category->name . '</a> </p> ';
                }
            }
        }
        ?>

                </div><!-- #content -->
            </div><!-- #primary -->
        </div>
        <?php 
        echo $args['after_widget'];
    }