当前位置: 首页>>代码示例>>PHP>>正文


PHP z_taxonomy_image_url函数代码示例

本文整理汇总了PHP中z_taxonomy_image_url函数的典型用法代码示例。如果您正苦于以下问题:PHP z_taxonomy_image_url函数的具体用法?PHP z_taxonomy_image_url怎么用?PHP z_taxonomy_image_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了z_taxonomy_image_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_header

* 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();
开发者ID:acutedeveloper,项目名称:carepoint-development,代码行数:30,代码来源:taxonomy-care-services-categories.php

示例2: import_wp_object

 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);
 }
开发者ID:Alefal,项目名称:amalficoastapps.it,代码行数:11,代码来源:category.php

示例3: get_the_terms

?>
		<?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;
开发者ID:Nguyenkain,项目名称:strida.vn,代码行数:31,代码来源:single-distributor.php

示例4: get_header

<?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">
			
开发者ID:wesayso,项目名称:gy-blog,代码行数:30,代码来源:tag.php

示例5: whats_hot_tabs

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++;
    }
}
开发者ID:xyren,项目名称:oceanic-wordpress-theme,代码行数:31,代码来源:functions.php

示例6: the_title

</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');
开发者ID:agileontheweb,项目名称:xvp,代码行数:31,代码来源:categorie-page.php

示例7: elseif

} 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
开发者ID:markbaindesign,项目名称:mbd-wp-theme,代码行数:31,代码来源:content-cover.php

示例8: get_header

 * @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);
开发者ID:AryvartPhpTeam,项目名称:exotic,代码行数:31,代码来源:single.php

示例9: mostdiscussed_loader

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];
                ?>
//.........这里部分代码省略.........
开发者ID:CafeMochaOrg,项目名称:SourceCode,代码行数:101,代码来源:functions.php

示例10: getCategoryImage

function getCategoryImage($categoryId)
{
    return z_taxonomy_image_url($categoryId);
    //return get_option('_category_image' . $categoryId);
}
开发者ID:cjhgithub,项目名称:ctheme,代码行数:5,代码来源:post_list.php

示例11: url

?>
<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 
开发者ID:avijitdeb,项目名称:flatterbox.com,代码行数:31,代码来源:page-review-sentiments.php

示例12:

        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>
开发者ID:alvarpoon,项目名称:egg,代码行数:31,代码来源:content-collection.php

示例13: bloginfo

</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()
?>
开发者ID:n3yang,项目名称:n1,代码行数:31,代码来源:taxonomy-genre.php

示例14: archiveHeader

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 
}
开发者ID:spielhoelle,项目名称:amnesty,代码行数:55,代码来源:functions.php

示例15: get_header

<?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>
开发者ID:wesayso,项目名称:gy-blog,代码行数:31,代码来源:category.php


注:本文中的z_taxonomy_image_url函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。