上一页 1 2 3 4 5 6 7 8 9 10 ··· 68 下一页
思路: 如果使用默认的wordpress的方法,调出来的数据就会被后台的显示个数所限制,而我们需要的是自由控制文章数和翻页,所以我使用WP_Query 获取当前分类的方法可以通过 get_query_var('cat'); 分页通过get_query_var('paged') 快捷替换以上红字部分: Read More
posted @ 2017-06-05 10:17 tinyphp Views(4595) Comments(0) Diggs(0) Edit
利用侧边栏显示联系方式是很方便的 一、先开启侧边栏工具,在functions.php加上 二、然后后台左栏将出现小工具,将联系方式功能拖到小工具那里设置保存 三、在模版文件中调用侧边栏 输出html: Read More
posted @ 2017-06-02 21:42 tinyphp Views(1487) Comments(0) Diggs(0) Edit
实现效果 制作网站的时候,想在页面左栏显示最新发表的文章,如: 一、先开启侧边栏工具,在functions.php加上 二、然后后台左栏将出现小工具,将最新发表文章功能拖到小工具那里保存 三、在模版文件中调用侧边栏 输出html: Read More
posted @ 2017-06-02 21:32 tinyphp Views(866) Comments(0) Diggs(0) Edit
分类实现效果: 点击"产品"相关分类,显示 否则显示 创建文件: category.php cat-news.php cat-product.php 由于点击分类时wordpress会调用category.php,所以在此页面做判断,如果是"产品分类"则调用产品模板,如果是"新闻分类"则调用新闻模板 Read More
posted @ 2017-06-02 21:10 tinyphp Views(1955) Comments(0) Diggs(0) Edit
产品展示用到文章和缩略图功能 实现步骤: 一、创建分类 后台创建文章分类:产品中心 二、开启缩略图功能 在主题的functions.php中,添加一段代码,代码如下: 更多设置请参考: http://www.cnblogs.com/tinyphp/p/6359167.html 三、添加文章并设置缩略 Read More
posted @ 2017-05-14 11:09 tinyphp Views(4395) Comments(0) Diggs(0) Edit
根据名称获取链接 根据别名获取链接 Read More
posted @ 2017-05-13 16:14 tinyphp Views(1653) Comments(0) Diggs(0) Edit
xxx/?page_id=5 想在首页调用以上页面的内容怎么做呢? 完整: 选择调用内容 调用缩略图: 调用内容(带截取): 调用标题(带截取): Read More
posted @ 2017-05-07 10:44 tinyphp Views(396) Comments(0) Diggs(0) Edit
函数:get_page_link(页面id编号) 作用:获取指定页面的链接地址 用法: 输出为:xxx/?page_id=2 如在循环里则不用填写id参数,否则必须指定。 Read More
posted @ 2017-05-06 19:35 tinyphp Views(2179) Comments(0) Diggs(0) Edit
页面使用: functions.php Read More
posted @ 2017-05-03 23:13 tinyphp Views(968) Comments(0) Diggs(0) Edit
什么是JSX? JSX是JavaScript XML的缩写,其本质是js,表现形式类似于XML,与js区别在于可直接在里面编写html标签。 怎么使用JSX? 语法规则: JSX 的基本语法规则:HTML 标签以 < 开头,代码块以 { 开头 Read More
posted @ 2017-05-01 22:37 tinyphp Views(269) Comments(0) Diggs(0) Edit
上一页 1 2 3 4 5 6 7 8 9 10 ··· 68 下一页