[prisna-google-website-translator]
wordpress 调用栏目集合
导航调取二级分类和二级分类下的产品 <?php $categories = get_categories('child_of=2&depth=0&hide_empty=0'); foreach ($categories as $category) { $now_cat = $category->term_id; $cat_na…
swiper 参数
html结构 <!-- Swiper --> <div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide">Slide 1</div> <div class="swiper-…
owl 参数配置
Owl的新特性有: 可以无限循环项目可以居中显示灵活的速度控制多级别的padding设置项目间可以设置Margin使几乎所有的选项都具有响应能力多种宽度设置丰富的回调事件RTL(从右向左移动)YouTube/Vimeo视频支持锚链接导航合并项还有更多...  浏览器兼容 Owl Carousel 2.x.x 版本和以前的1.x.x版本不兼…
jq 获取api 数据 输出
1:天行数据的返回数据。拿抖音热点榜举例: { "code": 200, "msg": "success", "newslist": [ { "hotindex": 11552765, "label": 5, "word": "郭聪明暂停唱歌接受治疗" }, { "hotindex": 8354588, "label": 0, "word"…
修改wordpress列表页排序方式
<?php $posts = query_posts($query_string . '&orderby=date&showposts=15'); ?> 放在这个函数之前 <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
whatsapp 跳转链接带文字
$(".whatsapp a").attr('href','https://api.whatsapp.com/send?phone=8615803897674&text=Hello!%20I%27m%20interested%20in%20your%20product%20%20'+ encodeURIComponent(window.lo…
WordPress可视化编辑器css样式
.alignnone { margin: 5px 20px 20px 0; } .aligncenter, div.aligncenter { display: block; margin: 5px auto 5px auto; } .alignright { float:right; margin: 5px 0 20px 20px; } .ali…
wordpress 调取置顶文章从第二个开始
<?php /** * WordPress 查询综合参考 * 编译:luetkemj - luetkemj.com * * 官方文档: http://codex.wordpress.org/Class_Reference/WP_Query * 源代码: http://core.trac.wordpress.org/browser/tags/3…
wp 调取单页面的特色图片
File: wp-includes/media.php function wp_get_attachment_image_src( $attachment_id, $size = 'thumbnail', $icon = false ) { // Get a thumbnail or intermediate image if there is o…
wp 调取指定栏目的二级分类
<?php $a=get_category_root_id(1); $args=array( 'orderby' => 'id', 'hide_empty' => "0", 'child_of' => $a,//可以换为:'child_of' => '1', // 这个参数是什么,还在确认。 ); $categories=get_catego…
wp 调取二级分类下的三级类
<?php $categories = get_categories('child_of=1&depth=0&hide_empty=0&orderby=id&order=asc'); foreach ($categories as $category) { $now_cat = $category->term_…
帝国cms如何增加tags标签及其使用方法
在帝国cms开发个人博客模板过程中,由于博客有tags标签业务需求,所以万书涛就研究了帝国cms的tags建立和调用,具体方法如下: 1. 首先是增加tags标签  打开帝国cms后台,选择栏目-管理tags-增加tags,如下图一和二 图一 图二 在上面的图二中,有几个地方解释下,tag名称这个地方就填写你tags的主旨名称,不要太长,网页标题、…