本文整理汇总了PHP中wpmd_is_tablet函数的典型用法代码示例。如果您正苦于以下问题:PHP wpmd_is_tablet函数的具体用法?PHP wpmd_is_tablet怎么用?PHP wpmd_is_tablet使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpmd_is_tablet函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_template_part
<?php
get_template_part('block/top4sale');
get_template_part('block/list_category_hot');
?>
<?php
wp_reset_postdata();
$width = 320;
$height = 320;
$char = 18;
if (wpmd_is_phone() || wpmd_is_tablet()) {
$width = 360;
$height = 360;
$char = 12;
}
$args = array('post_status' => 'publish', 'post_type' => 'post', 'category_name' => 'news', 'order' => 'DESC', 'meta_key' => 'sort_by', 'orderby' => 'meta_value post_date', 'meta_query' => array(array('key' => 'hot', 'value' => true)), 'posts_per_page' => 12);
$the_query = new WP_Query($args);
if ($the_query->have_posts()) {
?>
<ul class="row">
<?php
while ($the_query->have_posts()) {
$the_query->the_post();
$category_cat = get_the_category();
$class = '';
if ($category_cat && $category_cat[0]->slug != 'nguon-dia-oc') {
$class = 'not-real';
$char = 16;
开发者ID:vanlong200880,项目名称:tmdt,代码行数:31,代码来源:hot_bk.php
示例2: get_category_by_slug
$parentId = get_category_by_slug('giai-tri');
$args = array('category_custom_field' => 'category_order', 'orderby' => 'category_order', 'order' => 'DESC', 'parent' => $parentId->term_id, 'taxonomy' => 'category', 'hide_empty' => 0);
$categories = get_categories($args);
$cats = array();
foreach ($categories as $cat) {
$ordr = get_field('category_order', 'category_' . $cat->term_id);
$cat->order = $ordr;
$cats[] = $cat;
}
usort($cats, function ($a, $b) {
return $a->order - $b->order;
});
$width = 320;
$height = 320;
if (wpmd_is_tablet()) {
$width = 380;
$height = 380;
}
if (wpmd_is_phone()) {
$width = 767;
$height = 767;
}
if ($cats) {
?>
<div class="row entertainment">
<?php
$count = 1;
foreach ($cats as $value) {
?>
<?php
开发者ID:vanlong200880,项目名称:tmdt,代码行数:30,代码来源:entertainment.php
示例3: wpmd_is_tablet
<div class="row">
<?php
if (!wpmd_is_phone()) {
?>
<div class="col-md-<?php
echo wpmd_is_tablet() ? 3 : 2;
?>
col-sm-4">
<?php
get_template_part('template-small/menu');
?>
</div>
<?php
}
?>
<div class="col-md-6 col-sm-8">
<?php
get_template_part('template-small/advertisement');
?>
</div>
<div class="col-md-<?php
echo wpmd_is_tablet() ? 3 : 4;
?>
col-sm-12">
<?php
get_template_part('template-small/advertisement_four');
?>
</div>
</div>
</div>
</section><!--end wrap-new-adv-->
开发者ID:vanlong200880,项目名称:uni,代码行数:31,代码来源:header.php
注:本文中的wpmd_is_tablet函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论