
wordpress
莫冲
TO Be SIMPLE & STUDPID
展开
-
[WORDPRESS系列]WordPress的have_posts()和the_post()用法解析
在WordPress的index.php文章循环输出中,通常会有下面一段代码: 这里有两个函数,have_posts()和the_post()。have_posts()解析:WordPress的have_posts() 默认是一个全局函数。have_posts函数被调用时实际上是调用全局变量$wp_query->have_posts()成员原创 2017-03-28 14:31:53 · 2382 阅读 · 0 评论 -
[WORDPRESS系列]子主题
参考来源:https://codex.wordpress.org/zh-cn:%E5%AD%90%E4%B8%BB%E9%A2%98http://blog.wpjam.com/article/child-themes/原创 2015-04-20 14:40:32 · 171 阅读 · 0 评论 -
[WORDPRESS系列]插件API之常用过滤器(filter)
参考来源:http://www.wordpress.la/codex-%E6%8F%92%E4%BB%B6API%E4%B9%8B%E5%B8%B8%E7%94%A8%E8%BF%87%E6%BB%A4%E5%99%A8(filter).htmlhttp://www.ssdn2007.com/wordpress-filter-reference.html本文列出了WordPress...原创 2015-04-20 14:22:17 · 1453 阅读 · 0 评论 -
[WORDPRESS系列]插件API之常用动作(action)
参考来源:http://www.wordpress.la/codex-%E6%8F%92%E4%BB%B6API%E4%B9%8B%E5%B8%B8%E7%94%A8%E5%8A%A8%E4%BD%9C%28action%29.html本文列出了WordPress 2.1及以上版本中可用于插件开发的动作钩子(hook)。想了解过滤器钩子和动作钩子的定义和作用?请看插件API。...原创 2015-04-20 14:07:01 · 829 阅读 · 0 评论 -
[WORDPRESS系列]WordPress 模板层次详细介绍
参考来源:http://blog.wpjam.com/article/wordpress-template-hierarchy/WordPress模板的定义非常方便,但是在定制模板之前,我们有必要知道WordPress的模板层次,了解WordPress是如何加载模板文件的,这将有利于开发模板时合理利用资源及提高工作效率。万能的index.php我们知道一个最简单的WordP...原创 2015-04-20 10:51:09 · 257 阅读 · 0 评论 -
[WORDPRESS系列]dashboard 外观添加小工具
参考http://codex.wordpress.org/zh-cn:%E4%BB%A4%E4%B8%BB%E9%A2%98%E6%94%AF%E6%8C%81%E5%B0%8F%E5%B7%A5%E5%85%B7在functions.php 添加[code="java"][/code]原创 2015-04-17 17:49:50 · 229 阅读 · 0 评论 -
[WORDPRESS系列] : endif;endwhile;流程控制的替代语法
参考:http://php.net/manual/zh/control-structures.alternative-syntax.php原创 2015-04-17 14:56:05 · 304 阅读 · 0 评论 -
[WORDPRESS系列]常用函数
[b]wpautop[/b]简介将文本中的两个换行符转换成 HTML 段落 (...),其余的换行转换成 WordPress 使用这个函数对日志内容和摘要进行格式化处理。用法[code="java"][/code]参考:http://blog.wpjam.com/function_reference/wpautop/post相关函数[b]the_...原创 2015-04-17 14:47:09 · 355 阅读 · 0 评论 -
[WORDPRESS系列]WordPress的have_posts()和the_post()用法解析
在WordPress的index.php文章循环输出中,通常会有下面一段代码:[code="java"] [/code]这里有两个函数,have_posts()和the_post()。have_posts()解析:WordPress的have_posts() 默认是一个全局函数。have_posts函数被调用时实际上是调用全...原创 2015-04-17 14:28:56 · 533 阅读 · 0 评论 -
[WORDPRESS系列]在主题的 function.php 中给 WordPress 编辑器添加自定义按钮(Quicktags)
参考资料:http://www.ssdn2007.com/wordpress-add-quicktags-button-in-function-php.htmlhttp://codex.wordpress.org.cn/Quicktags_APIhttp://yusi123.com/460.htmlfunctions.php 代码<?php// 给editor添加更多默认原创 2017-03-28 14:33:02 · 707 阅读 · 0 评论 -
[WORDPRESS系列]插件API之常用过滤器(filter)
参考来源:http://www.wordpress.la/codex-%E6%8F%92%E4%BB%B6API%E4%B9%8B%E5%B8%B8%E7%94%A8%E8%BF%87%E6%BB%A4%E5%99%A8(filter).htmlhttp://www.ssdn2007.com/wordpress-filter-reference.html本文列出了WordPress 2.1原创 2017-03-28 14:32:46 · 799 阅读 · 0 评论 -
[WORDPRESS系列]插件API之常用动作(action)
参考来源:http://www.wordpress.la/codex-%E6%8F%92%E4%BB%B6API%E4%B9%8B%E5%B8%B8%E7%94%A8%E5%8A%A8%E4%BD%9C%28action%29.html本文列出了WordPress 2.1及以上版本中可用于插件开发的动作钩子(hook)。想了解过滤器钩子和动作钩子的定义和作用?请看插件API。想了解插件原创 2017-03-28 14:32:35 · 647 阅读 · 0 评论 -
[WORDPRESS系列]WordPress 模板层次详细介绍
参考来源:http://blog.wpjam.com/article/wordpress-template-hierarchy/WordPress模板的定义非常方便,但是在定制模板之前,我们有必要知道WordPress的模板层次,了解WordPress是如何加载模板文件的,这将有利于开发模板时合理利用资源及提高工作效率。万能的index.php我们知道一个最简单的WordPress主题原创 2017-03-28 14:32:27 · 873 阅读 · 0 评论 -
[WORDPRESS系列]dashboard 外观添加小工具
参考http://codex.wordpress.org/zh-cn:%E4%BB%A4%E4%B8%BB%E9%A2%98%E6%94%AF%E6%8C%81%E5%B0%8F%E5%B7%A5%E5%85%B7在functions.php 添加<?phpif ( function_exists('register_sidebar') ) register_sideba原创 2017-03-28 14:32:18 · 832 阅读 · 0 评论 -
[WORDPRESS系列] : endif;endwhile;流程控制的替代语法
参考:http://php.net/manual/zh/control-structures.alternative-syntax.php原创 2017-03-28 14:32:09 · 365 阅读 · 0 评论 -
[WORDPRESS系列]常用函数
wpautop简介将文本中的两个换行符转换成 HTML 段落 (...),其余的换行转换成 WordPress 使用这个函数对日志内容和摘要进行格式化处理。用法参考:http://blog.wpjam.com/function_reference/wpautop/post相关函数the_category() the_category() 是用来调用日志的在的所有类别的原创 2017-03-28 14:32:01 · 1454 阅读 · 0 评论 -
[WORDPRESS系列]在主题的 function.php 中给 WordPress 编辑器添加自定义按钮(Quicktags)...
参考资料:http://www.ssdn2007.com/wordpress-add-quicktags-button-in-function-php.htmlhttp://codex.wordpress.org.cn/Quicktags_APIhttp://yusi123.com/460.htmlfunctions.php 代码[code="java"]...原创 2015-04-20 15:09:13 · 448 阅读 · 0 评论